diff options
| author | Bart Van Assche <bvanassche@acm.org> | 2026-10-13 15:10:02 -0700 |
|---|---|---|
| committer | Martin K. Petersen (Oracle) <mkp@kernel.org> | 2026-10-13 23:26:01 -0400 |
| commit | 2f50ca3d46b4d5916874ba19612498c0a9c1f5f9 (patch) | |
| tree | e02d7c11735639cc2f3ec57f8c0c40141b94d3a4 /scripts/Makefile.thinlto | |
| parent | 2f4880c22e838d54eae9ab153b0f8dce60531bf1 (diff) | |
| download | linux-next-2f50ca3d46b4d5916874ba19612498c0a9c1f5f9.tar.gz linux-next-2f50ca3d46b4d5916874ba19612498c0a9c1f5f9.zip | |
scsi: scsi_debug: Fix a locking bug in resp_write_same()
If fetch_to_dev_buffer() fails in resp_write_same(), the function jumps
to 'out' without releasing the data write lock acquired earlier via
sdeb_data_write_lock(). Jump to 'unlock' instead so that
sdeb_data_write_unlock() is called on the error path. This bug has been
discovered by building the scsi_debug driver with Clang and modified
lock context annotations. The modified lock context annotations are
available in patch "scsi: scsi_debug: Improve lock context annotations".
Fixes: 84f3a3c01d70 ("scsi: scsi_debug: Atomic write support")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: John Garry <john.garry@linux.dev>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/271ea11d3bc147d950a89419181f0c3f5a1ebf3b.1791924924.git.bvanassche@acm.org
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
