mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-05 18:59:58 +00:00
[SCSI] fix use after potential free in scsi_remove_device
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
parent
b568355733
commit
541950027f
1 changed files with 4 additions and 2 deletions
|
@ -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(&sdev->host->scan_mutex);
|
||||
up(&shost->scan_mutex);
|
||||
}
|
||||
EXPORT_SYMBOL(scsi_remove_device);
|
||||
|
||||
|
|
Loading…
Reference in a new issue