diff options
| author | Niklas Cassel <cassel@kernel.org> | 2026-09-29 10:25:02 +0200 |
|---|---|---|
| committer | Martin K. Petersen (Oracle) <mkp@kernel.org> | 2026-10-03 10:14:29 -0400 |
| commit | 1809f9bf3da24d513613e3bfbb97db91fd4928b4 (patch) | |
| tree | d667d8bdc6ffbefa187b814d345b3883078cddcf /tools/lib/python/kdoc/python_version.py | |
| parent | c9aedbcbff0fe31fabdea09600609eb30e05441d (diff) | |
| download | linux-next-1809f9bf3da24d513613e3bfbb97db91fd4928b4.tar.gz linux-next-1809f9bf3da24d513613e3bfbb97db91fd4928b4.zip | |
scsi: scsi_debug: Evaluate scsi_debug_lbp() only once
corrupt_lbas(), resp_write_dt0() and resp_write_same() call
scsi_debug_lbp() to decide whether to take the zone metadata lock, and call
it again to decide whether to touch the provisioning map that the lock
protects.
The result is not constant: scsi_debug_lbp() is false while fake_rw is set,
and fake_rw is writable at runtime, both as a module parameter and through
its driver attribute. The second call can therefore touch the map after the
first decided not to take the lock.
Call it once and use the result throughout.
Assisted-by: LLM
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: John Garry <john.garry@linux.dev>
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Link: https://patch.msgid.link/20260929082456.857423-20-cassel@kernel.org
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
