aboutsummaryrefslogtreecommitdiffstats
path: root/net/switchdev/switchdev.c
diff options
context:
space:
mode:
authorMing Lei <[email protected]>2020-10-10 03:25:39 +0000
committerMartin K. Petersen <[email protected]>2020-10-26 20:05:34 +0000
commit831e3405c2a344018a18fcc2665acc5a38c3a707 (patch)
tree55edf7cfc12446727e86994b307d4c4b413f828d /net/switchdev/switchdev.c
parentLinux 5.10-rc1 (diff)
downloadkernel-831e3405c2a344018a18fcc2665acc5a38c3a707.tar.gz
kernel-831e3405c2a344018a18fcc2665acc5a38c3a707.zip
scsi: core: Don't start concurrent async scan on same host
The current scanning mechanism is supposed to fall back to a synchronous host scan if an asynchronous scan is in progress. However, this rule isn't strictly respected, scsi_prep_async_scan() doesn't hold scan_mutex when checking shost->async_scan. When scsi_scan_host() is called concurrently, two async scans on same host can be started and a hang in do_scan_async() is observed. Fixes this issue by checking & setting shost->async_scan atomically with shost->scan_mutex. Link: https://lore.kernel.org/r/[email protected] Cc: Christoph Hellwig <[email protected]> Cc: Ewan D. Milne <[email protected]> Cc: Hannes Reinecke <[email protected]> Cc: Bart Van Assche <[email protected]> Reviewed-by: Lee Duncan <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions