From: John Garry <john.g.garry@oracle.com>
To: Bart Van Assche <bvanassche@acm.org>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Marco Elver <elver@google.com>, linux-scsi@vger.kernel.org
Subject: Re: [PATCH v5 0/6] Enable lock context analysis in the SCSI core and UFS driver
Date: Thu, 6 Aug 2026 10:26:48 +0100 [thread overview]
Message-ID: <b2b50bc4-5582-4c3c-b8fc-7595c3ba8eb7@oracle.com> (raw)
In-Reply-To: <cover.1785965531.git.bvanassche@acm.org>
On 05/08/2026 22:36, Bart Van Assche wrote:
> i Martin,
>
> This patch series enables lock context analysis for the SCSI core and the UFS
> driver. The advantages are as follows:
> - The compiler (only Clang) verifies whether the lock and unlock calls match
> what has been declared via __must_hold(), __acquires() or __releases().
> This is useful for catching locking bugs in error paths.
> - Support for __guarded_by() is enabled. If a member variable is annotated
> with __guarded_by(lock), the compiler will issue a warning if that member
> variable is accessed without holding 'lock'.
>
> Additionally, a patch is included that suppresses KCSAN complaints about SCSI
> host state changes.
Hi Bart,
In future would we enable context analysis for other members of
Scsi_Host or other core structures which are protected by
shost->host_lock, like __scsi_find_target() which scans &shost->targets
and requires that lock to be held? Or __scsi_device_lookup()?
I appreciate that this is just the first series for SCSI, but I am just
curious on any plans.
Thanks,
John
>
> More information about lock context analysis is available in the cover letter of
> [PATCH v5 00/36] Compiler-Based Context- and Locking-Analysis
> (https://urldefense.com/v3/__https://lore.kernel.org/
> lkml/20251219154418.3592607-1-elver@google.com/__;!!ACWV5N9M2RV99hQ!
> J6vIIEsGYaCUO5o4dBP5HeRy8kITKmj51IVOoZN-7h8k2FZDnUuaJGMWAt3E5BL5Xf4r7iNMlthMNat6EJGVFg$<https://urldefense.com/v3/__https://lore.kernel.org/
> lkml/20251219154418.3592607-1-elver@google.com/__;!!ACWV5N9M2RV99hQ!
> J6vIIEsGYaCUO5o4dBP5HeRy8kITKmj51IVOoZN-7h8k2FZDnUuaJGMWAt3E5BL5Xf4r7iNMlthMNat6EJGVFg$>).
>
> Please consider this patch series for the next merge window.
prev parent reply other threads:[~2026-08-06 9:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-05 21:36 [PATCH v5 0/6] Enable lock context analysis in the SCSI core and UFS driver Bart Van Assche
2026-08-05 21:36 ` [PATCH v5 1/6] ufs: core: Set task state before io_schedule_timeout() Bart Van Assche
2026-08-05 21:36 ` [PATCH v5 2/6] ufs: core: Enable lock context analysis Bart Van Assche
2026-08-05 21:36 ` [PATCH v5 3/6] scsi: core: Pass the SCSI host pointer directly to scanning functions Bart Van Assche
2026-08-06 9:02 ` John Garry
2026-08-05 21:36 ` [PATCH v5 4/6] scsi: core: Add lock context annotations Bart Van Assche
2026-08-05 22:00 ` sashiko-bot
2026-08-06 9:03 ` John Garry
2026-08-05 21:36 ` [PATCH v5 5/6] scsi: core: Protect host state changes with the host lock Bart Van Assche
2026-08-06 9:13 ` John Garry
2026-08-06 17:19 ` Bart Van Assche
2026-08-07 8:21 ` John Garry
2026-08-07 22:26 ` Bart Van Assche
2026-08-05 21:36 ` [PATCH v5 6/6] scsi: core: Enable lock context analysis Bart Van Assche
2026-08-06 9:16 ` John Garry
2026-08-06 16:58 ` Bart Van Assche
2026-08-06 9:26 ` John Garry [this message]
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=b2b50bc4-5582-4c3c-b8fc-7595c3ba8eb7@oracle.com \
--to=john.g.garry@oracle.com \
--cc=bvanassche@acm.org \
--cc=elver@google.com \
--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