lkml.org 
[lkml]   [2000]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectSmall Bug
Date
<!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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I have found a&nbsp;small bug in
raid5.c</FONT></DIV>
<DIV><FONT size=2>&nbsp;</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-&gt;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-&gt;working_disks !=
conf-&gt;raid_disks)</FONT></DIV>
<DIV><FONT face=Arial>goto out;</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial>//&nbsp;&nbsp;&nbsp; THE BUG IS IN THE FOLLOWING TWO
LINES</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial>t</FONT><FONT face=Arial>mp = kmalloc(sizeof(*tmp),
GFP_KERNEL);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></DIV>
<DIV><FONT face=Arial>tmp-&gt;b_size = 4096;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial>// tmp is used without check if it is null;</FONT></DIV>
<DIV>&nbsp;</DIV><FONT face=Arial>
<DIV>Best regards</DIV>
<DIV>&nbsp;</DIV>
<DIV>Andreas Moroder</FONT></FONT></DIV></FONT></DIV></BODY></HTML>
\
 
 \ /
  Last update: 2005-03-22 12:39    [W:0.024 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site