summaryrefslogtreecommitdiffstats
path: root/mm/page_io.c
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2020-10-10 05:25:39 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2020-10-26 21:05:34 +0100
commit831e3405c2a344018a18fcc2665acc5a38c3a707 (patch)
tree55edf7cfc12446727e86994b307d4c4b413f828d /mm/page_io.c
parentLinux 5.10-rc1 (diff)
downloadlinux-831e3405c2a344018a18fcc2665acc5a38c3a707.tar.xz
linux-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/20201010032539.426615-1-ming.lei@redhat.com Cc: Christoph Hellwig <hch@lst.de> Cc: Ewan D. Milne <emilne@redhat.com> Cc: Hannes Reinecke <hare@suse.de> Cc: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Lee Duncan <lduncan@suse.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'mm/page_io.c')
0 files changed, 0 insertions, 0 deletions