* [PATCH] scsi: core: Enable context analysis for hosts.o
@ 2026-08-14 16:20 Bart Van Assche
2026-08-14 16:23 ` John Garry
0 siblings, 1 reply; 2+ messages in thread
From: Bart Van Assche @ 2026-08-14 16:20 UTC (permalink / raw)
To: Martin K . Petersen
Cc: linux-scsi, Bart Van Assche, John Garry, James E.J. Bottomley,
Martin K. Petersen (Oracle)
Enable compiler-based context analysis for drivers/scsi/hosts.c by setting
CONTEXT_ANALYSIS_hosts.o := y in drivers/scsi/Makefile.
The SCSI host management code in hosts.c now has the necessary lock context
annotations (such as __must_hold(shost->host_lock) on scsi_host_set_state)
and conforms to compile-time lock checking rules. It builds cleanly without
triggering any context analysis warnings.
Enable context analysis for hosts.o so that lock correctness and context
safety invariants for SCSI host operations are verified at compile time
when CONFIG_WARN_CONTEXT_ANALYSIS is enabled.
Fixes: fb0fc67db962 ("scsi: core: Enable context analysis")
Reported-by: John Garry <john.g.garry@oracle.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
drivers/scsi/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/Makefile b/drivers/scsi/Makefile
index 72eb395ccf1d..533623382eca 100644
--- a/drivers/scsi/Makefile
+++ b/drivers/scsi/Makefile
@@ -15,6 +15,7 @@
# *!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!
CONTEXT_ANALYSIS_constants.o := y
+CONTEXT_ANALYSIS_hosts.o := y
CONTEXT_ANALYSIS_scsi.o := y
CONTEXT_ANALYSIS_scsi_common.o := y
CONTEXT_ANALYSIS_scsi_devinfo.o := y
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] scsi: core: Enable context analysis for hosts.o
2026-08-14 16:20 [PATCH] scsi: core: Enable context analysis for hosts.o Bart Van Assche
@ 2026-08-14 16:23 ` John Garry
0 siblings, 0 replies; 2+ messages in thread
From: John Garry @ 2026-08-14 16:23 UTC (permalink / raw)
To: Bart Van Assche, Martin K . Petersen
Cc: linux-scsi, James E.J. Bottomley, Martin K. Petersen (Oracle)
Reviewed-by: John Garry <john.g.garry@oracle.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-14 16:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-14 16:20 [PATCH] scsi: core: Enable context analysis for hosts.o Bart Van Assche
2026-08-14 16:23 ` 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.