[PATCH] 2.5.9-dj1 sd_init() fails at boot

From: Douglas Gilbert (dougg@torque.net)
Date: Tue Apr 23 2002 - 20:56:59 EST


With both lk 2.5.8-dj1 and lk 2.5.9-dj1 the
scsi disk driver (sd) fails in sd_init()
with OOM causing the scsi disk holding my
root fs not to be found. The kmalloc(,GFP_ATOMIC)
for the array of "struct hd_struct" returns NULL.
Strange that my Athlon 1.2 GHz box with 512 MB of
ram should get an OOM error at that point.

Pete Zaitcev came across similar problems in the
2.4 series which he has addressed by changing the
kmalloc() to vmalloc().

Rather than a minimal patch, the attachment uses
vmalloc() and does a cleanup of the sd driver that was
presented in an earlier post:
http://marc.theaimsgroup.com/?l=linux-scsi&m=101798201714399&w=2
As noted in that post, the attachment also fixes an
oops resulting from this sequence (when sd is a module):
 $ modprobe sd_mod; rmmod sd_mod; modprobe sd_mod

Doug Gilbert


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Apr 23 2002 - 22:00:37 EST