lkml.org 
[lkml]   [1999]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH] drivers/scsi/hosts.c derefencing NULL
Date
Well... this really does little good because for some reason most people
decided scsi_init_malloc and scsi_register would never failed. Basically
everyone is going to blow up on the NULL return anyways.... but at least it
is at the driver level code and not the lower level scsi code.

I'm only guessing why this is happening but I have all my scsi support in
modules since I boot off an IBM UDMA drive. I have a cron job set to do a
rmmod -a every 5 minutes to cleanup unused modules. I'm also doing scanning
using SANE and the sg devices. I noticed sg is set to eat a big chunk of
memory. My guess is I happen to start a scan and hence load the sg,BusLogic,
and scsi_mod modules while the rmmod -a is executing. Basically kmod thinks
they need to be loaded but they haven't been completely unloaded yet. Extra
memory is being eaten and the __get_free_pages call fails.

BTW is there a reason why if __get_free_pages fails we don't call kmalloc???

Brian Macy
[unhandled content-type:application/x-gzip]
\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.024 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site