summaryrefslogtreecommitdiffstats
path: root/block/blk-mq-rdma.c
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2019-07-12 10:08:19 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-31 07:28:35 +0200
commit2d33fd9aac31cb0d8f3e23ac709e48377eedc7ac (patch)
tree780328996eb64b4c3e0e88deb9d5fe89ac73e5df /block/blk-mq-rdma.c
parent1c02ad9426fa0da63e81a3d47dd8b699912f3c7d (diff)
downloadlinux-stable-2d33fd9aac31cb0d8f3e23ac709e48377eedc7ac.tar.gz
linux-stable-2d33fd9aac31cb0d8f3e23ac709e48377eedc7ac.tar.bz2
linux-stable-2d33fd9aac31cb0d8f3e23ac709e48377eedc7ac.zip
scsi: core: Fix race on creating sense cache
commit f9b0530fa02e0c73f31a49ef743e8f44eb8e32cc upstream. When scsi_init_sense_cache(host) is called concurrently from different hosts, each code path may find that no cache has been created and allocate a new one. The lack of locking can lead to potentially overriding a cache allocated by a different host. Fix the issue by moving 'mutex_lock(&scsi_sense_cache_mutex)' before scsi_select_sense_cache(). Fixes: 0a6ac4ee7c21 ("scsi: respect unchecked_isa_dma for blk-mq") Cc: Stable <stable@vger.kernel.org> Cc: Christoph Hellwig <hch@lst.de> Cc: Hannes Reinecke <hare@suse.com> Cc: Ewan D. Milne <emilne@redhat.com> Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block/blk-mq-rdma.c')
0 files changed, 0 insertions, 0 deletions