summaryrefslogtreecommitdiff
path: root/drivers/edac/amd76x_edac.c
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2019-07-12 05:08:19 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-26 10:12:52 +0300
commitf263fbd268c749d6de500f69b81dc46da0e049d8 (patch)
treeae478242b4606aaabe7ae382a9b764b98dd6113a /drivers/edac/amd76x_edac.c
parent38fd8cecc0e278cc929fd0cebdd97b935da41285 (diff)
downloadlinux-f263fbd268c749d6de500f69b81dc46da0e049d8.tar.xz
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 'drivers/edac/amd76x_edac.c')
0 files changed, 0 insertions, 0 deletions