projects
/
profile
/
ivi
/
kernel-x86-ivi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
277e76f
)
[SCSI] fix memory leak in scsi_report_lun_scan
author
Alan Stern
<stern@rowland.harvard.edu>
Fri, 12 Feb 2010 17:13:31 +0000
(12:13 -0500)
committer
James Bottomley
<James.Bottomley@suse.de>
Thu, 18 Feb 2010 16:52:10 +0000
(10:52 -0600)
This patch (as1333) fixes a bug in scsi_report_lun_scan(). If a
newly-allocated device can't be used, it should be deleted.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/scsi_scan.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/scsi_scan.c
b/drivers/scsi/scsi_scan.c
index
012f73a
..
60b262d
100644
(file)
--- a/
drivers/scsi/scsi_scan.c
+++ b/
drivers/scsi/scsi_scan.c
@@
-1339,8
+1339,10
@@
static int scsi_report_lun_scan(struct scsi_target *starget, int bflags,
sdev = scsi_alloc_sdev(starget, 0, NULL);
if (!sdev)
return 0;
- if (scsi_device_get(sdev))
+ if (scsi_device_get(sdev)) {
+ __scsi_remove_device(sdev);
return 0;
+ }
}
sprintf(devname, "host %d channel %d id %d",