aboutsummaryrefslogtreecommitdiff
path: root/scripts/gcc-plugins
diff options
context:
space:
mode:
authorMing Lei <[email protected]>2019-07-12 10:08:19 +0800
committerMartin K. Petersen <[email protected]>2019-07-16 22:39:24 -0400
commitf9b0530fa02e0c73f31a49ef743e8f44eb8e32cc (patch)
treeca8a8951347a3b5bbba448d80269476271ed064b /scripts/gcc-plugins
parent0cdc58580b37a160fac4b884266b8b7cb096f539 (diff)
scsi: core: Fix race on creating sense cache
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 <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Hannes Reinecke <[email protected]> Cc: Ewan D. Milne <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins')
0 files changed, 0 insertions, 0 deletions