Small Bug

Claudia Moroder (claudiamoroder@st-ulrich.suedtirol.net)
Fri, 6 Oct 2000 21:32:14 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_0013_01C02FDC.E4C1F180
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I did send this small bug to the mantainer of Multipple Device SCSI, but =
did get no answer after a week so I put it at the linux-kernel.

I have found a small bug in raid5.c
=20
static int __check_consistency (mddev_t *mddev, int row)
{
raid5_conf_t *conf =3D mddev->private;
kdev_t dev;
struct buffer_head *bh[MD_SB_DISKS], *tmp =3D NULL;
int i, ret =3D 0, nr =3D 0, count;
struct buffer_head *bh_ptr[MAX_XOR_BLOCKS];
if (conf->working_disks !=3D conf->raid_disks)
goto out;
=20
// THE BUG IS IN THE FOLLOWING TWO LINES

tmp =3D kmalloc(sizeof(*tmp), GFP_KERNEL); =20
tmp->b_size =3D 4096;

// tmp is used without check if it is null;

Best regards

Andreas Moroder

------=_NextPart_000_0013_01C02FDC.E4C1F180
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

I did send this small bug to the = mantainer of=20 Multipple Device SCSI, but did get no answer after a week so I put it at = the=20 linux-kernel.
 
 
I have found a small bug in=20 raid5.c
 
static int __check_consistency (mddev_t *mddev, = int=20 row)
{
raid5_conf_t *conf =3D = mddev->private;
kdev_t dev;
struct buffer_head *bh[MD_SB_DISKS], *tmp =3D=20 NULL;
int i, ret =3D 0, nr =3D 0, count;
struct buffer_head = *bh_ptr[MAX_XOR_BLOCKS];
if (conf->working_disks !=3D=20 conf->raid_disks)
goto out;
 
//    THE BUG IS IN THE FOLLOWING = TWO=20 LINES
 
tmp =3D = kmalloc(sizeof(*tmp),=20 GFP_KERNEL);      
tmp->b_size =3D 4096;
 
// tmp is used without check if it is = null;
 
Best regards
 
Andreas Moroder
------=_NextPart_000_0013_01C02FDC.E4C1F180-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/