[PATCH] drivers/scsi/hosts.c derefencing NULL

Brian Macy (bmacy@sunshinecomputing.com)
Mon, 22 Feb 1999 07:19:45 -0800


This is a multi-part message in MIME format.

------=_NextPart_000_0012_01BE5E33.B96687C0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit

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

------=_NextPart_000_0012_01BE5E33.B96687C0
Content-Type: application/x-gzip;
name="hosts-pat.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="hosts-pat.gz"

H4sICPpy0TYAA2hvc3RzLXBhdABtUcluwjAQPZOveOKAEhK3SWhZgqBBregiaCvRniNjDBiCg2IH
qdu/NwscuszF9rw3M2+eCSFYJ0qrM1abJhJjPofvw+0E7kVw2YXX6/UM27aRpGJ1fmLOMokHKuF1
4HWDlh/47YoZhiDtVsvxPNjF2UYYGihC6TRjGjOmRHSXt0ETKdcHGjtoqvVe6n7Fq5IYwPxbYani
LqTQ0Y7GccJMJd55svxDtWBj4xiolQGYOh9Ahplka862fBEJRaPFjqLRwAZXuB0/RzfTEQK4Fj7L
5+jlaXp/bfUNUqgSS5gnZQM8vk4mFj4qqLZPhdRbsz6mIuYLlBpTvhJK8zTAb8nFglkqc2LRpX4a
cFw9R8r8MftlkMoVqpOdYJHi2mxUOsiw+IyIMi0O3HGtH/YdwXmm3nIn3f+wZaW2RL8B+EfORwUC
AAA=

------=_NextPart_000_0012_01BE5E33.B96687C0--

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