projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b568355
)
[SCSI] fix use after potential free in scsi_remove_device
author
Alan Stern
<stern@rowland.harvard.edu>
Fri, 16 Sep 2005 01:52:51 +0000
(21:52 -0400)
committer
James Bottomley
<jejb@mulgrave.(none)>
Fri, 16 Sep 2005 02:03:54 +0000
(22:03 -0400)
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/scsi_sysfs.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/scsi/scsi_sysfs.c
b/drivers/scsi/scsi_sysfs.c
index b8052d5206cca22f03a782044b9ca5b7d78f605f..83f87c41b18d6fdf39f7d96806ef71ef16e794b8 100644
(file)
--- a/
drivers/scsi/scsi_sysfs.c
+++ b/
drivers/scsi/scsi_sysfs.c
@@
-707,9
+707,11
@@
void __scsi_remove_device(struct scsi_device *sdev)
**/
void scsi_remove_device(struct scsi_device *sdev)
{
- down(&sdev->host->scan_mutex);
+ struct Scsi_Host *shost = sdev->host;
+
+ down(&shost->scan_mutex);
__scsi_remove_device(sdev);
- up(&s
dev->
host->scan_mutex);
+ up(&shost->scan_mutex);
}
EXPORT_SYMBOL(scsi_remove_device);