aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/proc.py
diff options
context:
space:
mode:
authorBart Van Assche <[email protected]>2022-11-17 10:36:26 -0800
committerMartin K. Petersen <[email protected]>2022-11-26 00:35:16 +0000
commit50759b881e1d6879e7cef15c74bdea2e937338c9 (patch)
tree66040a589fa15b68eb3f49178b23bca419e4a0e1 /scripts/gdb/linux/proc.py
parenta500c4cc06cd2830c692b571dd0a1c3585f23150 (diff)
scsi: device_handler: alua: Call scsi_device_put() from non-atomic context
Since commit f93ed747e2c7 ("scsi: core: Release SCSI devices synchronously"), scsi_device_put() might sleep. Avoid calling it from alua_rtpg_queue() with the pg_lock held. The lock only pretects h->pg, anyway. To avoid the pg being freed under us, because of a race with another thread, take a temporary reference. In alua_rtpg_queue(), verify that the pg still belongs to the sdev being passed before actually queueing the RTPG. This patch fixes the following smatch warning: drivers/scsi/device_handler/scsi_dh_alua.c:1013 alua_rtpg_queue() warn: sleeping in atomic context alua_check_vpd() <- disables preempt -> alua_rtpg_queue() -> scsi_device_put() Cc: Martin Wilck <[email protected]> Cc: Hannes Reinecke <[email protected]> Cc: Sachin Sant <[email protected]> Cc: Benjamin Block <[email protected]> Suggested-by: Martin Wilck <[email protected]> Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Link: https://lore.kernel.org/r/[email protected] Tested-by: Sachin Sant <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/proc.py')
0 files changed, 0 insertions, 0 deletions