shost->async_scan should be protected by mutex_lock, otherwise the check
of "called twice" won't work.
Signed-off-by: Ouyang Zhaowei
---
drivers/scsi/scsi_scan.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index fd
ync_scan = 1;
spin_unlock_irqrestore(shost->host_lock, flags);
@@ -1751,6 +1751,8 @@ static struct async_scan_data
*scsi_prep_async_scan(struct Scsi_Host *shost)
err:
kfree(data);
+ unlock:
+ mutex_unlock(&shost->scan_mutex);
return NULL;
}
On 2017.9.11 9:44,
shost->async_scan should be protected by mutex_lock, otherwise the check
of "called twice" won't work.
Signed-off-by: Ouyang Zhaowei
---
drivers/scsi/scsi_scan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index fd88dab.
3 matches
Mail list logo