All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/6] Enable lock context analysis in the SCSI core and UFS driver
@ 2026-08-05 21:36 Bart Van Assche
  2026-08-05 21:36 ` [PATCH v5 1/6] ufs: core: Set task state before io_schedule_timeout() Bart Van Assche
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: Bart Van Assche @ 2026-08-05 21:36 UTC (permalink / raw)
  To: Martin K . Petersen; +Cc: John Garry, Marco Elver, linux-scsi, Bart Van Assche

Hi 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.

More information about lock context analysis is available in the cover letter of
[PATCH v5 00/36] Compiler-Based Context- and Locking-Analysis
(https://lore.kernel.org/lkml/20251219154418.3592607-1-elver@google.com/).

Please consider this patch series for the next merge window.

Thanks,

Bart.

Changes compared to v4:
 - Added Reviewed-by tags to the UFS patches.
 - Made the title and the description of patch 3/6 more detailed.

Changes compared to v3:
 - Left out all changes except those for the SCSI core and the UFS driver.

Changes compared to v2:
 - Added patch "scsi: core: Pass the SCSI host pointer directly".
 - Corrected several annotations that had missing or extra ampersands (&).
 - Reduced the number of __assume_ctx_lock() statements.

Changes compared to v1:
 - Split patch "Enable lock context analysis" into one patch per driver.

Bart Van Assche (6):
  ufs: core: Set task state before io_schedule_timeout()
  ufs: core: Enable lock context analysis
  scsi: core: Pass the SCSI host pointer directly to scanning functions
  scsi: core: Add lock context annotations
  scsi: core: Protect host state changes with the host lock
  scsi: core: Enable lock context analysis

 drivers/scsi/Makefile                     | 22 ++++++++++
 drivers/scsi/device_handler/Makefile      |  3 ++
 drivers/scsi/hosts.c                      | 18 ++++----
 drivers/scsi/megaraid/megaraid_sas_base.c |  2 +-
 drivers/scsi/mpi3mr/mpi3mr_os.c           |  2 +-
 drivers/scsi/mpt3sas/mpt3sas_scsih.c      |  2 +-
 drivers/scsi/qla4xxx/ql4_os.c             |  6 +--
 drivers/scsi/scsi_lib.c                   |  3 +-
 drivers/scsi/scsi_scan.c                  | 52 ++++++++++++++---------
 drivers/scsi/scsi_sysfs.c                 |  7 +--
 drivers/ufs/core/Makefile                 |  2 +
 drivers/ufs/core/ufs-debugfs.c            |  8 +++-
 drivers/ufs/core/ufshcd.c                 | 15 +++++++
 drivers/ufs/host/Makefile                 |  2 +
 include/scsi/scsi_host.h                  | 23 +++++++---
 15 files changed, 117 insertions(+), 50 deletions(-)


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2026-08-07 22:27 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v5 0/6] Enable lock context analysis in the SCSI core and UFS driver John Garry

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.