]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] osduld: Ref-counting bug fix
authorBoaz Harrosh <bharrosh@panasas.com>
Mon, 16 Nov 2009 18:44:02 +0000 (20:44 +0200)
committerJames Bottomley <James.Bottomley@suse.de>
Fri, 4 Dec 2009 18:01:45 +0000 (12:01 -0600)
commit9ca9857cd2077e8225af86e6d4c7f121b70993e5
treee2a6c1a93428c870561646558666e2a01d05a5fa
parent96bf529c98bc5f53e6eb01fd0073b460ff30887f
[SCSI] osduld: Ref-counting bug fix

If scsi has released the device (logout), and exofs has last
reference on the osduld_device it will be freed by
osd_uld_release() within the call to fput(). But this will
oops in cdev_release() which is called after the fops->release.
(cdev is embedded within osduld_device). __uld_get/put pair
makes sure we have a cdev for the duration of fput()

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/osd/osd_uld.c