Messages in this thread | | | From | "Brian Macy" <> | Subject | [PATCH] drivers/scsi/hosts.c derefencing NULL | Date | Mon, 22 Feb 1999 07:19:45 -0800 |
| |
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] | |