Messages in this thread |  | | From | "Claudia Moroder" <> | Subject | Small Bug | Date | Fri, 6 Oct 2000 21:32:14 +0200 |
| |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content="text/html; charset=iso-8859-1" http-equiv=Content-Type> <META content="MSHTML 5.00.2919.6307" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2> <DIV><FONT face=Arial size=2>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.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>I have found a small bug in raid5.c</FONT></DIV> <DIV><FONT size=2> </DIV> <DIV><FONT face=Arial>static int __check_consistency (mddev_t *mddev, int row)</FONT></DIV> <DIV><FONT face=Arial>{</FONT></DIV> <DIV><FONT face=Arial>raid5_conf_t *conf = mddev->private;</FONT></DIV> <DIV><FONT face=Arial>kdev_t dev;</FONT></DIV> <DIV><FONT face=Arial>struct buffer_head *bh[MD_SB_DISKS], *tmp = NULL;</FONT></DIV> <DIV><FONT face=Arial>int i, ret = 0, nr = 0, count;</FONT></DIV> <DIV><FONT face=Arial>struct buffer_head *bh_ptr[MAX_XOR_BLOCKS];</FONT></DIV> <DIV><FONT face=Arial>if (conf->working_disks != conf->raid_disks)</FONT></DIV> <DIV><FONT face=Arial>goto out;</FONT></DIV> <DIV><FONT face=Arial></FONT> </DIV> <DIV><FONT face=Arial>// THE BUG IS IN THE FOLLOWING TWO LINES</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial>t</FONT><FONT face=Arial>mp = kmalloc(sizeof(*tmp), GFP_KERNEL); </FONT></DIV> <DIV><FONT face=Arial>tmp->b_size = 4096;</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial>// tmp is used without check if it is null;</FONT></DIV> <DIV> </DIV><FONT face=Arial> <DIV>Best regards</DIV> <DIV> </DIV> <DIV>Andreas Moroder</FONT></FONT></DIV></FONT></DIV></BODY></HTML>
|  |