From: Bart Van Assche <bvanassche@acm.org>
To: "Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, Bart Van Assche <bvanassche@acm.org>
Subject: [PATCH v3 0/7] scsi_debug: Enable lock context analysis
Date: Tue, 29 Sep 2026 16:22:56 -0700 [thread overview]
Message-ID: <cover.1790723966.git.bvanassche@acm.org> (raw)
Hi Martin,
This patch series fixes a locking bug in the scsi_debug driver and enables
lock context analysis.
Please consider this patch series for the next merge window.
Thanks,
Bart.
Changes compared to v2:
- Moved DIX/DIF verification into a helper function (__resp_read_dt0_dix())
to reduce indentation.
- Removed unnecessary 'else' branches after 'return'.
- Set the SCSI status code only if do_device_access() fails instead of
unconditionally setting it to DID_ERROR << 16 beforehand.
Changes compared to v1:
- Fixed an issue where the error code was clobbered in resp_write_same() and
__resp_write_same() when fetch_to_dev_buffer() fails (John Garry and
sashiko-bot).
- Fixed return value handling in resp_read_dt0() and resp_write_dt0():
previously a positive byte count returned by do_device_access() was
incorrectly treated as a SCSI status code and returned to the caller. Now,
the SCSI status is passed via an output pointer and only negative return
values trigger an error return (sashiko-bot).
- Improved lock context annotations:
* Annotated existing rwlock_t members (&sip->macc_data_lck,
&sip->macc_sector_lck, &sip->macc_meta_lck) directly with __acquires /
__releases instead of defining and embedding dummy context lock structs
in struct sdeb_store_info.
* Dropped the unwarranted __context_unsafe() annotation from
sdeb_data_read_lock().
* Updated the commit descriptions to match the code changes.
Bart Van Assche (7):
scsi: scsi_debug: Fix a locking bug in resp_write_same()
scsi: scsi_debug: Split resp_write_same()
scsi: scsi_debug: Split corrupt_lbas()
scsi: scsi_debug: Split resp_read_dt0()
scsi: scsi_debug: Split resp_write_dt0()
scsi: scsi_debug: Improve lock context annotations
scsi: core: Enable lock context analysis for the scsi_debug driver
drivers/scsi/Makefile | 1 +
drivers/scsi/scsi_debug.c | 412 +++++++++++++++++++++++---------------
2 files changed, 250 insertions(+), 163 deletions(-)
next reply other threads:[~2026-09-29 23:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 23:22 Bart Van Assche [this message]
2026-09-29 23:22 ` [PATCH v3 1/7] scsi: scsi_debug: Fix a locking bug in resp_write_same() Bart Van Assche
2026-09-29 23:22 ` [PATCH v3 2/7] scsi: scsi_debug: Split resp_write_same() Bart Van Assche
2026-09-29 23:22 ` [PATCH v3 3/7] scsi: scsi_debug: Split corrupt_lbas() Bart Van Assche
2026-09-29 23:23 ` [PATCH v3 4/7] scsi: scsi_debug: Split resp_read_dt0() Bart Van Assche
2026-09-29 23:23 ` [PATCH v3 5/7] scsi: scsi_debug: Split resp_write_dt0() Bart Van Assche
2026-09-29 23:23 ` [PATCH v3 6/7] scsi: scsi_debug: Improve lock context annotations Bart Van Assche
2026-09-29 23:35 ` sashiko-bot
2026-09-30 13:16 ` Bart Van Assche
2026-09-29 23:23 ` [PATCH v3 7/7] scsi: core: Enable lock context analysis for the scsi_debug driver Bart Van Assche
2026-10-03 14:24 ` [PATCH v3 0/7] scsi_debug: Enable lock context analysis Martin K. Petersen (Oracle)
2026-10-04 22:39 ` Bart Van Assche
2026-10-06 1:39 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1790723966.git.bvanassche@acm.org \
--to=bvanassche@acm.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox