Skip to contentSkip to conversation

linux-2.6.0-test11 [BUG] -- scsi_add/remove_device - out of memory

DISCUSSION Heiko Carstens 2 participants 2 messages Dec 10, 2003 SCSI

lore
Share & tools
lore
#0 lore raw

Hello all,

it looks to me as if the SCSI stack has a memory leak. If I have the following endless loop in our ZFCP LLD we end up within a very short time in an out of memory situation (tested on an S390 virtual machine with 128MB):

while(1) {
        scsi_add_device(...)
        scsi_remove_device(...);
}

It takes only about 40 iterations to reach the out of memory situation. The device that gets added and removed does respond to Inquiry commands. Since I'm not sure what are the pending fixes for the SCSI stack I'm wondering if this is a known bug.

Heiko

#1 lore raw
Quoted 11 lines · Heiko Carstens

Hello all,

it looks to me as if the SCSI stack has a memory leak. If I have the following endless loop in our ZFCP LLD we end up within a very short time in an out of memory situation (tested on an S390 virtual machine with 128MB):

while(1) {
        scsi_add_device(...)
        scsi_remove_device(...);
}
Quoted 4 lines

It takes only about 40 iterations to reach the out of memory situation. The device that gets added and removed does respond to Inquiry commands. Since I'm not sure what are the pending fixes for the SCSI stack I'm wondering if this is a known bug.

Sounds there's a scsi_device_put missing somewherein your driver..