diff options
| author | Niklas Cassel <cassel@kernel.org> | 2026-09-29 10:25:01 +0200 |
|---|---|---|
| committer | Martin K. Petersen (Oracle) <mkp@kernel.org> | 2026-10-03 10:14:29 -0400 |
| commit | c9aedbcbff0fe31fabdea09600609eb30e05441d (patch) | |
| tree | a6244a62886146b4839bf6b8a046ce62b89e0789 /tools/lib/python | |
| parent | a349876633f7a583429367daf16f9a4282118255 (diff) | |
| download | linux-next-c9aedbcbff0fe31fabdea09600609eb30e05441d.tar.gz linux-next-c9aedbcbff0fe31fabdea09600609eb30e05441d.zip | |
scsi: scsi_debug: Take the zone metadata lock before the data lock
resp_comp_write() takes the data lock and then the zone metadata lock,
while every other command that takes both takes the metadata lock first and
reaches the data lock through do_device_access(). A COMPARE AND WRITE and
any other write to the same store can therefore deadlock each other.
Take the locks in the same order as everywhere else.
Correct the comment above map_region() while here: the provisioning map is
covered by the metadata lock rather than the data lock, which is why
resp_unmap() takes only the metadata lock.
Assisted-by: LLM
Fixes: 84f3a3c01d70 ("scsi: scsi_debug: Atomic write support")
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Link: https://patch.msgid.link/20260929082456.857423-19-cassel@kernel.org
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
