Re: [PATCH v4 6/6] scsi: core: Enable lock context analysis

[email protected] Fri, 31 Jul 2026 22:05:46 +0000
Newsgroups org.kernel.vger.linux-scsi
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(=
s) to consider:
- [Medium] Makefile variables intended to enable lock context analysis are =
incorrectly named due to missing 'scsi_' prefixes, failing to enable analys=
is for most intended SCSI core files.
--

--- Patch [6]: [PATCH v4 6/6] scsi: core: Enable lock context analysis ---
commit 72acfbb8a25ff6235de3b56d2113eb7681fd8184
Author: Bart Van Assche <[email protected]>

scsi: core: Enable lock context analysis

Enable lock context analysis for those SCSI core files that build
without triggering any compiler warnings.

> diff --git a/drivers/scsi/Makefile b/drivers/scsi/Makefile
> index 842c254bb2269..69ea80819f3ba 100644
> --- a/drivers/scsi/Makefile
> +++ b/drivers/scsi/Makefile
> @@ -14,6 +14,28 @@
>  # satisfy certain initialization assumptions in the SCSI layer.
>  # *!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!
> =20
> +CONTEXT_ANALYSIS_constants.o :=3D y
> +CONTEXT_ANALYSIS_scsi.o :=3D y
> +CONTEXT_ANALYSIS_scsicam.o :=3D y
> +CONTEXT_ANALYSIS_common.o :=3D y
> +CONTEXT_ANALYSIS_devinfo.o :=3D y
> +CONTEXT_ANALYSIS_dh.o :=3D y
> +CONTEXT_ANALYSIS_ioctl.o :=3D y
> +CONTEXT_ANALYSIS_lib.o :=3D y
> +CONTEXT_ANALYSIS_lib_dma.o :=3D y
> +CONTEXT_ANALYSIS_error.o :=3D y
> +CONTEXT_ANALYSIS_logging.o :=3D y
> +CONTEXT_ANALYSIS_netlink.o :=3D y
> +CONTEXT_ANALYSIS_pm.o :=3D y
> +CONTEXT_ANALYSIS_scan.o :=3D y
> +CONTEXT_ANALYSIS_sysfs.o :=3D y
> +CONTEXT_ANALYSIS_trace.o :=3D y
> +CONTEXT_ANALYSIS_sd.o :=3D y
> +CONTEXT_ANALYSIS_sd_dif.o :=3D y
> +CONTEXT_ANALYSIS_sd_zbc.o :=3D y
> +CONTEXT_ANALYSIS_sr.o :=3D y
> +CONTEXT_ANALYSIS_sr_ioctl.o :=3D y
> +CONTEXT_ANALYSIS_proc.o :=3D y

[Severity: Medium]
Do these Makefile variables need a "scsi_" prefix to match the actual
object files?

For example, drivers/scsi/scsi_ioctl.c generates scsi_ioctl.o, so Kbuild
expects CONTEXT_ANALYSIS_scsi_ioctl.o :=3D y.

Since the target stems do not match the variables (like common, devinfo, dh,
ioctl, lib, lib_dma, error, logging, netlink, pm, scan, sysfs, trace, and
proc), Kbuild will silently ignore them and lock context analysis will not
be enabled for these files.

--=20
Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/68f3346cab2be570839=
[email protected]?part=3D6