commit 782a516e8f432f5ded4adab206bb809e29593c54 Author: Bart Van Assche Date: Fri Sep 25 11:26:32 2026 -0700 scsi: drivers: Enable lock context analysis Enable lock context analysis for all drivers in the drivers/scsi/ directory except for the scsi_debug driver. The scsi_debug driver is excluded because of a locking bug in that driver. Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/91ec026386fea160bc7080de977ce4e076eeb510.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 659dec2ce32e79e9f438ea32d82cd3fa19fc20c1 Author: Bart Van Assche Date: Fri Sep 25 11:26:31 2026 -0700 scsi: sym53c8xx_2: Enable lock context analysis Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/385ccf5f15b469a4909249e60ae7332b733e943d.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit e24eedc81ec4fe16f943a02b3617e2175c961c84 Author: Bart Van Assche Date: Fri Sep 25 11:26:30 2026 -0700 scsi: snic: Enable lock context analysis Set the CONTEXT_ANALYSIS variable in the Makefile. Acked-by: Narsimhulu Musini Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/23db7563bf154f505bdda5f05f7cfd574abc8b87.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 78b27248f7210c2bdb73de319c52489fd2d64b5d Author: Bart Van Assche Date: Fri Sep 25 11:26:29 2026 -0700 scsi: smartpqi: Enable lock context analysis Document locking requirements with __acquires(), __releases() and __cond_releases(). Suppress context analysis complaints with __acquire() annotations. This approach has been chosen because this driver uses the mutex API incorrectly. Fixing this driver falls outside the scope of this patch series. Cc: Tomas Henzl Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/4fd694d95bafa1b09d4e3ff997b10dcd04bc8f8e.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit d5f024412d239ce7fa49e387af19b28caeac097c Author: Bart Van Assche Date: Fri Sep 25 11:26:28 2026 -0700 scsi: iSCSI transport: Prepare for enabling lock context analysis Document locking requirements with __must_hold(). Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/72bd8921b4ed0a58bd83beed2981ec48372b56fd.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 20026b0b55ec0db6a18b84f4c1252165d5a19449 Author: Bart Van Assche Date: Fri Sep 25 11:26:27 2026 -0700 scsi: qla4xxx: Enable lock context analysis Annotate the functions that perform conditional locking with __context_unsafe(). Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/1136d8587d266c50935680d246161def1c760f05.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 5ed1a2dd293ac3ae1ea2ab15b906f21e8dcb7193 Author: Bart Van Assche Date: Fri Sep 25 11:26:26 2026 -0700 scsi: qla2xxx: Enable lock context analysis Make several code blocks with conditional locking compatible with thread-safety analysis. Annotate functions that perform conditional locking with __context_unsafe(). No functionality has been changed. Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/7ce5e2ceb5c479190c9c44b2bf4339c91a8e6c55.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 23d5f939d99fd3e4c62e97d896578abfc32fe768 Author: Bart Van Assche Date: Fri Sep 25 11:26:25 2026 -0700 scsi: qla1280: Prepare for enabling lock context analysis Document locking requirements with __must_hold(). Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/ddbb3ac055d757d5113096ebda77dfa122606239.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 5bb1688785a5314cea4eaf91b8fa5e3609501727 Author: Bart Van Assche Date: Fri Sep 25 11:26:24 2026 -0700 scsi: qla1280: Pass the host pointer directly to several functions Pass the struct Scsi_Host pointer directly to _qla1280_wait_for_single_command(), qla1280_wait_for_single_command(), qla1280_wait_for_pending_commands(), and qla1280_error_action(). Introduce the local variable 'host' in error handling functions to avoid repetitive dereferencing of cmd->device->host. This patch prepares for enabling lock context analysis. No functionality has been changed. Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/4c2a8952fd8d3c8742af5685d0bb3a1677ba92b5.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 6210d20f7fe48c76b0ca8ee2584ef93b0bac2364 Author: Bart Van Assche Date: Fri Sep 25 11:26:23 2026 -0700 scsi: qedi: Enable lock context analysis Annotate qedi_cleanup_all_io() with __context_unsafe() since it performs conditional locking. Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/670af9856e17f9c86ef2119aa7b3b266645e86da.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit cdc1694e333b95e238b2c3a59d5053561990495e Author: Bart Van Assche Date: Fri Sep 25 11:26:22 2026 -0700 scsi: qedf: Enable lock context analysis Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/a85d74900f96562d7ecc34cd6b16dd4b2f642d57.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 74688075dd07ada7c2a7e46ab7bd37d7630b44da Author: Bart Van Assche Date: Fri Sep 25 11:26:21 2026 -0700 scsi: pm8001: Enable lock context analysis Document locking requirements with __must_hold(). Acked-by: Jack Wang Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/e51355852d4a14478545bc9bb5fd9af9fd947bf4.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 202aeb5af5e21bb603e0669f0633fb7e2563d468 Author: Bart Van Assche Date: Fri Sep 25 11:26:20 2026 -0700 scsi: pcmcia: Enable lock context analysis Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/a6c7c5f042af4d8504c29e7fc0c6f84be2c0f153.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 53812028f864ffb3cbc2176ca42d069b2e6e5b8f Author: Bart Van Assche Date: Fri Sep 25 11:26:19 2026 -0700 scsi: mvsas: Enable lock context analysis Document locking requirements with __must_hold(). Annotate functions that perform conditional locking with __context_unsafe(). Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/208203a820c27927c13b906fd69620de0f136502.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 8d3d0e8d26a65055b93e1a54243f12bfd2223951 Author: Bart Van Assche Date: Fri Sep 25 11:26:18 2026 -0700 scsi: mpt3sas: Enable lock context analysis Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/91450f15b421be527cb9831e3f9a762d7f56536f.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit b6ac5193c69266a3873044c947e214d5d12144bc Author: Bart Van Assche Date: Fri Sep 25 11:26:17 2026 -0700 scsi: lpfc: Prepare for enabling lock context analysis Annotate the functions that perform conditional locking with __context_unsafe(). Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/9ace40e6af0b7623c61d9e3caad997856455dbef.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 554a002f96f3dcbe2aad0f23fb0c2b9c73cacf73 Author: Bart Van Assche Date: Fri Sep 25 11:26:16 2026 -0700 scsi: libsas: Enable lock context analysis Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/20e64720347207239130312c7a7c6ef530ebce38.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 4901e49c5c609c2919badea87f8a9ed379fe5cf1 Author: Bart Van Assche Date: Fri Sep 25 11:26:15 2026 -0700 scsi: libsas: Prepare for enabling lock context analysis Since Clang requires that lock context annotations only refer to variables that are visible, modify a __must_hold() annotation. Signed-off-by: Bart Van Assche Reviewed-by: Jason Yan Link: https://patch.msgid.link/15aea1d6d04eed87a84c23a6f3eaa487378f0bda.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 3a6d7333e3f2b5ccd730e0b5ba7a7f2c52a7da49 Author: Bart Van Assche Date: Fri Sep 25 11:26:14 2026 -0700 scsi: libfc: Enable lock context analysis Document locking requirements with __must_hold(). Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/21a39d6277c0f296d0d5188bcdcb0ffcfda7a192.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 10385e735e8a7b28686769f8904844dd82d18b89 Author: Bart Van Assche Date: Fri Sep 25 11:26:13 2026 -0700 scsi: isci: Enable lock context analysis Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/bf1003a84db3f1f15e67a2f02ccfc2f0b156ef20.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 68ce6d43f4ff0ff974dca38c677efb001ec971d8 Author: Bart Van Assche Date: Fri Sep 25 11:26:12 2026 -0700 scsi: ips: Prepare for enabling lock context analysis Annotate ips_next() with __context_unsafe() because it performs conditional locking. Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/f55b7075d5703ab7d95c1f063e2f78377a7250a8.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 9c176edb892ce47aef4514297a5346185e21a6da Author: Bart Van Assche Date: Fri Sep 25 11:26:11 2026 -0700 scsi: ipr: Prepare for enabling lock context analysis Document locking requirements with __must_hold(). Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/3e6e59930da8c522c95d598aeb04bb30dbc11e75.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit e2bb4cd0808037adcc9ee06738ac6b27bd8b91b0 Author: Bart Van Assche Date: Fri Sep 25 11:26:10 2026 -0700 scsi: ipr: Pass the host pointer directly to several functions Pass the struct Scsi_Host pointer directly to ipr_send_blocking_cmd(), ipr_device_reset(), and __ipr_eh_dev_reset(). Introduce the local variable 'host' in error handling functions to avoid repetitive dereferencing of cmd->device->host. This patch prepares for enabling lock context analysis. No functionality has been changed. Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/3b255296f86ae38f349f92e14736adaa18c9d8ec.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 2a0cb1a2423d88bb1ec95fb7f3e4625e561ea983 Author: Bart Van Assche Date: Fri Sep 25 11:26:09 2026 -0700 scsi: ipr: Simplify ipr_eh_abort() Derive the SCSI host pointer once instead of three times. This was detected by Sashiko. No functionality has been changed. Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/8427eb7fc8e7c97cf115b9bfff27ed84c35c8bf4.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit fc4f84fdc528be95e05ca77b253b6428333eb6e3 Author: Bart Van Assche Date: Fri Sep 25 11:26:08 2026 -0700 scsi: ibmvscsi_tgt: Enable lock context analysis Document locking requirements with __must_hold() and enable lock context analysis. Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/c39eb31704284bf0f902b96a4307b43b076b0b0d.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 256962ec2846b6e964c5fccb44a00ab17e2a0b16 Author: Bart Van Assche Date: Fri Sep 25 11:26:07 2026 -0700 scsi: ibmvscsi: Enable lock context analysis Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/9651d7f88d22a9ebce8a8198f53338ad14164b88.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 107115c393ea2bc092ab94c5d72bf10cf641f495 Author: Bart Van Assche Date: Fri Sep 25 11:26:06 2026 -0700 scsi: hpsa: Prepare for enabling lock context analysis mutex_lock_interruptible() returns a negative value upon failure or zero upon success. Since the Clang thread-safety analyzer only supports == 0 and != 0 tests for functions that perform conditional locking, change the == -EINTR test into != 0. This change does not modify the behavior of hpsa_do_reset(). Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/4e3a71e82eb2deac956ac51f9019c410037526b4.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 11c345d6dbd8ba3724206c6683f2d7a0ca1cb3eb Author: Bart Van Assche Date: Fri Sep 25 11:26:05 2026 -0700 scsi: hisi_sas: Enable lock context analysis Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/5582ac312fea8c9315e3e87541eb0ea77524f685.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 70d2304ae575c0432251f36231d32e6ff0eb4f7f Author: Bart Van Assche Date: Fri Sep 25 11:26:04 2026 -0700 scsi: fnic: Enable lock context analysis Document locking requirements with __must_hold(). Suppress complaints about conditional locking in fnic_device_reset() with __acquire() and __release(). Cc: Karan Tilak Kumar Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/e8ac2000b7ed23cec78f5be360a21d741f50a73e.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit ac063a30e80d8c19f196838257c182f33601f5c2 Author: Bart Van Assche Date: Fri Sep 25 11:26:03 2026 -0700 scsi: fnic: Pass pointers directly to several functions In fdls_target_restart_nexus(), pass the struct fnic_iport_s pointer directly from callers instead of deriving it from tport->iport. In fnic_fdls_add_tport() and fnic_fdls_remove_tport(), pass the struct fnic pointer directly instead of the struct fnic_iport_s pointer. This patch prepares for enabling lock context analysis. No functionality has been changed. Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/8351d2f8c89a02fe537238d70d25d443375dca94.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit f9581845d99234db8933600e3a01259327f391c6 Author: Bart Van Assche Date: Fri Sep 25 11:26:02 2026 -0700 scsi: fcoe: Enable lock context analysis Pass the FCoE controller pointer to all functions that are called with one or more locks held. Document locking requirements by adding __must_hold() annotations. Enable lock context analysis in the Makefile. Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/61dba0e839bc3522ff74224278159dcfe4e6488c.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 5ba6b666f701df02412e50acd2061de3ab754190 Author: Bart Van Assche Date: Fri Sep 25 11:26:01 2026 -0700 scsi: esas2r: Enable lock context analysis Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/fb1299e4a889b89e9e47b4aff913393a266d0198.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 8281912eda174de2ffa6fd3fb4e01bc42552d688 Author: Bart Van Assche Date: Fri Sep 25 11:26:00 2026 -0700 scsi: elx: Enable lock context analysis Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/5514a1e6c77a2143f52b74747ad8de568b04e2f4.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 7a6d3b98469d7891a86fc9a70741be5d77548292 Author: Bart Van Assche Date: Fri Sep 25 11:25:59 2026 -0700 scsi: csiostor: Enable lock context analysis Document locking requirements across the csiostor driver by annotating functions in csio_hw.c, csio_lnode.c, csio_rnode.c, and csio_scsi.c with __must_hold(). Enable lock context analysis by setting CONTEXT_ANALYSIS in the Makefile. Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/214dee25ec4dab987380b8bd9d296303f9399691.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 640361f6a9446dbd995cd2f12433f1ec73159b70 Author: Bart Van Assche Date: Fri Sep 25 11:25:58 2026 -0700 scsi: csiostor: Pass the hw pointer directly to several functions Pass the struct csio_hw pointer directly to csio_scsi_cleanup_io_q(), csio_scsi_abort_io_q(), csio_scsim_cleanup_io(), and csio_scsim_cleanup_io_lnode() instead of passing the struct csio_scsim pointer. Update all callers and header declarations accordingly. Prepare the csiostor driver for enabling compiler-based lock context analysis. No functionality has been changed. Signed-off-by: Bart Van Assche Reviewed-by: Damien Le Moal Link: https://patch.msgid.link/f6e8b86640799a70cfb161210048ca4570bad03d.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 89cb9bbfcb6cf172b1db57b5f1d76be9da9f0393 Author: Bart Van Assche Date: Fri Sep 25 11:25:57 2026 -0700 scsi: bnx2i: Enable lock context analysis Document locking requirements with __must_hold(). Add an __assume_ctx_lock() annotation where locking is missing. Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/4cafc1018d9a072df3952488ca0bf4ffb7410be7.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 9495fadabea94cef4595938accfc48273eb955c7 Author: Bart Van Assche Date: Fri Sep 25 11:25:56 2026 -0700 scsi: bnx2fc: Enable lock context analysis Document the locking requirements with __must_hold(). Make the argument names in the definition and the declaration of bnx2fc_process_seq_cleanup_compl() consistent. Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/224219367c2af9fc4d193d0568bb8a6e8d22f97d.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 32f9cdb45bdbf37b2536e320f46e536acd3eed66 Author: Bart Van Assche Date: Fri Sep 25 11:25:55 2026 -0700 scsi: bnx2fc: Pass tgt directly to several functions Pass the tgt pointer directly to several functions. This patch prepares for enabling lock context annotation. No functionality has been changed. Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/e0073d5095f58569c8c16217f9b2fabd44762ad9.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit d9a376f43c1b4e13e8a1bfbe9610ccb3d1bac7ea Author: Bart Van Assche Date: Fri Sep 25 11:25:54 2026 -0700 scsi: bfa: Enable lock context analysis Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/a109c89c781c7623a7a1f4aa3b4bd4bbfe32d7b8.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit f3e83f6587514271a1706b5b56be32153d779f74 Author: Bart Van Assche Date: Fri Sep 25 11:25:53 2026 -0700 scsi: cxgbi: Enable lock context analysis Enable compile-time lock context analysis in the Makefile. Document where locking is missing by adding an __assume_ctx_lock() annotation. Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/e663e2d47afc8727991838bbfa29bb5ab21b38b8.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 901ade3fa13cb0597dc5a4a605ff8ede896d6e4f Author: Bart Van Assche Date: Fri Sep 25 11:25:52 2026 -0700 scsi: be2iscsi: Enable lock context analysis Document locking requirements by annotating locking requirements with __must_hold(). Enable lock context analysis for the be2iscsi driver by setting CONTEXT_ANALYSIS in the Makefile. Cc: Ketan Mukadam Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/e50dc59c2e48c84442e959e17989fb436eac6810.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit bbee7e5b4fd93a9faf2c811ef9822ce55368d1c1 Author: Bart Van Assche Date: Fri Sep 25 11:25:51 2026 -0700 scsi: libiscsi: Prepare for enabling lock context analysis Document locking requirements with __must_hold(). Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/7097a65b503cbf8d3a49c26f87293dd871080ea6.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit ae1c0d65bc71148891052ef8eb2e7de96c169594 Author: Bart Van Assche Date: Fri Sep 25 11:25:50 2026 -0700 scsi: libiscsi: Pass the session pointer directly to several functions Pass the struct iscsi_session pointer directly to all functions that must be called with an iscsi_session synchronization object held. Update the callers of the modified functions in the iSER, be2iscsi, bnx2i, cxgbi, libiscsi, qedi and qla4xxx drivers. This patch prepares for enabling compile-time lock context analysis in libiscsi. No functionality has been changed. Cc: Lee Duncan Cc: Chris Leech Cc: Mike Christie Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/f717adbc1d64a4ddb457d4878d704999922bf1d0.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 5a08252a78e1cf400e7e20f486f7b6e4f0fc38c4 Author: Bart Van Assche Date: Fri Sep 25 11:25:49 2026 -0700 scsi: arcmsr: Enable lock context analysis Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/98a213b9a65dab8bdd73eb1f9317844f35502498.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 678dd8c98ef551f8d1ff55ef51b4351e16a9381f Author: Bart Van Assche Date: Fri Sep 25 11:25:48 2026 -0700 scsi: aic94xx: Enable lock context analysis Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/ad452cff7f934476d9bdadd22d2ff6c73eedb0f7.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 22d469241b6ba17d3264c48529fba63433d9a99c Author: Bart Van Assche Date: Fri Sep 25 11:25:47 2026 -0700 scsi: aic7xxx: Enable lock context analysis Annotate ahd_lock() and ahc_lock() with __acquires() and ahd_unlock() and ahc_unlock() with __releases(). Enable lock context analysis for the aic7xxx driver by setting CONTEXT_ANALYSIS in the Makefile. Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/a4d826939ec5c251dc8fac03a824ed3ebd218eed.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 825b26b342eb85d86f08785e541ecb747d1c6c50 Author: Bart Van Assche Date: Fri Sep 25 11:25:46 2026 -0700 scsi: aha152x: Prepare for enabling lock context analysis Annotate aha152x_error() with __noreturn. This suppresses a lock context analysis compiler warning if lock context analysis is enabled. Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/b7dc3add84f4224a90a095d9996b0744cb04c1cc.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 44bb77a1afafcab3bc954a2585c849c0549c71bd Author: Bart Van Assche Date: Fri Sep 25 11:25:45 2026 -0700 scsi: aacraid: Enable lock context analysis Document the aac_send_reset_adapter() locking requirements with __must_hold(). Annotate functions that perform conditional locking with __context_unsafe(). Enable lock context analysis. Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/09b6a1659d968bdc94c01f8215bbb4e41af5ebdc.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit a51e9948d16815d900d994732e1d348106814ad0 Author: Bart Van Assche Date: Fri Sep 25 11:25:44 2026 -0700 scsi: NCR5380: Prepare for enabling lock context analysis Pass the struct NCR5380_hostdata pointer directly to NCR5380_select() and NCR5380_information_transfer() instead of the struct Scsi_Host pointer. This ensures that the lock context annotations (__releases(&hostdata->lock) and __acquires(&hostdata->lock)) refer to a function argument. Update callers and function prototypes accordingly. Cc: Finn Thain Cc: Michael Schmitz Signed-off-by: Bart Van Assche Acked-by: Finn Thain Link: https://patch.msgid.link/a9d1b960868ac4dae9c5a9b98aea5dcf6713fb97.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit d69fcaa34b67c08c636af4c6e1dc3a127f7e3fca Author: Bart Van Assche Date: Fri Sep 25 11:25:41 2026 -0700 scsi: st: Prepare for enabling lock context analysis Document what mutex is released by st_common_ioctl(). Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/fd9ee36abab86feb7b4a8e8c0cc7e84ba72fd764.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit c5b5b5786ae135b66f25b44ea4b40984b56399a3 Author: Bart Van Assche Date: Fri Sep 25 11:25:40 2026 -0700 scsi: sg: Prepare for enabling lock context analysis Annotate open_wait() with __must_hold() since it unlocks and locks a mutex. Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/e522b403882f67edd0c6b2865de71c032aaa6dfa.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit e46ce4e8ef2eaa8271fa79ce7de2633a65643dc7 Author: Bart Van Assche Date: Fri Sep 25 11:25:39 2026 -0700 scsi: PCI: Convert to_pci_dev() into an inline function Clang's context analysis checker performs alias analysis on expressions passed to annotations like __acquires(). Clang's alias analysis does not support container_of(). Convert to_pci_dev() from a macro into an inline function such that Clang recognizes multiple to_pci_dev() expressions as identical if the 'dev' argument is the same. It is on purpose that to_pci_dev() accepts a const pointer and returns a pointer that is not const. Any other choice, e.g. accepting a non-const pointer or returning a const pointer, triggers compiler errors in code that uses the to_pci_dev() macro. While _Generic() could be used to support const and non-const struct device pointers in a more elegant way, Clang's alias analysis does not support _Generic(). Acked-by: Bjorn Helgaas Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/f147ad227b85439d56183e60e0332547b84441bc.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 92821c2358c78345909889793918af8763808bd4 Author: Xingui Yang Date: Fri Oct 9 11:32:38 2026 +0800 scsi: hisi_sas: Fix spinup failure for SAS SSP devices in Active_Wait state SAS HDDs powered up with RNOT=1 wait in Active_Wait state for a NOTIFY(ENABLE SPINUP) primitive and keep returning NOT_READY with ASC/ASCQ 0x04/0x11, causing endless mid-layer retries and spinup failure. Parse the sense data in the slot completion path and, when LU_NOT_READY_NOTIFY_REQUIRED is returned by a directly-attached SSP device, queue work that sends the primitive from process context (sl_notify_ssp() contains msleep()). The work takes a runtime PM reference with pm_runtime_get_if_active(), pairing with pm_runtime_put_sync() in the work, so the controller stays resumed until the primitive is sent. Fixes: 60b4a5ee9034 ("scsi: hisi_sas: add v3 cq interrupt handler") Signed-off-by: Xingui Yang Link: https://patch.msgid.link/20261009033238.1076098-5-yangxingui@huawei.com Signed-off-by: Martin K. Petersen (Oracle) commit 7991f33110d21a9403338dbfe599472e3e1ceb32 Author: Xingui Yang Date: Fri Oct 9 11:32:37 2026 +0800 scsi: hisi_sas: Clear PHY error counts on phyup Some disks generate link errors during link establishment but still phy up successfully. These intermediate error counts are not cleared after phyup, leaving stale data for error detection. Clear them on phyup. Signed-off-by: Xingui Yang Link: https://patch.msgid.link/20261009033238.1076098-4-yangxingui@huawei.com Signed-off-by: Martin K. Petersen (Oracle) commit 7307109c92f702434669bfcd29fb8058ccc07b45 Author: Xingui Yang Date: Fri Oct 9 11:32:36 2026 +0800 scsi: hisi_sas: Fix incorrect delay values from magic-number cleanup Commit 4ca7fe99fc84 ("scsi: hisi_sas: Use macro instead of magic number") replaced several delay constants with a single macro of value 100. However, three sites originally used different values: - reset_hw_v3_hw: udelay(50) -> udelay(100) [doubled] - disable_phy_v3_hw: mdelay(50) -> mdelay(100) [doubled] - disable_host_v3_hw: mdelay(10) -> mdelay(100) [10x longer] The overly long delays on the PHY disable and host shutdown paths increase boot and shutdown time for all local PHYs. Add separate macros for each delay to restore the original values while still avoiding magic numbers. Fixes: 4ca7fe99fc84 ("scsi: hisi_sas: Use macro instead of magic number") Signed-off-by: Xingui Yang Link: https://patch.msgid.link/20261009033238.1076098-3-yangxingui@huawei.com Signed-off-by: Martin K. Petersen (Oracle) commit 4d7f9c3fdce773f6c69d17c1d4a05bd5e17f4b99 Author: Xingui Yang Date: Fri Oct 9 11:32:35 2026 +0800 scsi: libsas: Fix out-of-bounds memcpy() in sas_ssp_task_response() The min_t(int, ...) clamp of the device-provided sense_data_len turns negative for values >= 0x80000000 and is then used as the memcpy() length, reading and writing out of bounds. Compare as u32 instead. Well-formed responses are unaffected. Fixes: 366ca51f30de ("[SCSI] libsas: abstract STP task status into a function") Signed-off-by: Xingui Yang Link: https://patch.msgid.link/20261009033238.1076098-2-yangxingui@huawei.com Signed-off-by: Martin K. Petersen (Oracle) commit b633249f58832e6aeefa606d6d5aec76abfe6d89 Author: Eric Biggers Date: Wed Sep 30 21:48:57 2026 -0700 scsi: target: iscsi: Use crypto library API Make iscsi_target_auth.c call into the crypto library directly instead of going through crypto_shash. This is simpler and much more efficient, as it avoids overhead of the crypto_shash layer. The hash computation itself also no longer has error codes that need to be checked. For simplicity, still do a memory allocation per operation to buffer the data (which is typically less than 50 bytes here) so that the one-shot digest functions can be used. It's still much more efficient than doing the super slow crypto_alloc_shash(). Signed-off-by: Eric Biggers Reviewed-by: David Disseldorp Link: https://patch.msgid.link/20261001044857.169487-1-ebiggers@kernel.org Signed-off-by: Martin K. Petersen (Oracle) commit 3aeac6a2c2efb253bfa0d1ad8eba01d46a89d479 Author: Nigel Kirkland Date: Mon Oct 12 17:16:48 2026 -0700 scsi: lpfc: Update lpfc version to 15.0.0.1 Update lpfc version to 15.0.0.1 Signed-off-by: Nigel Kirkland Tested-by: Ewan D. Milne Link: https://patch.msgid.link/20261013001648.62289-9-nkirkland2304@gmail.com Signed-off-by: Martin K. Petersen (Oracle) commit 8dbdaf88f4b991cb5b0e178fa18deefcb1380207 Author: Nigel Kirkland Date: Mon Oct 12 17:16:47 2026 -0700 scsi: lpfc: Update correct ndlp refcnt when rejecting an unsolicited PLOGI The domain controller FC_ID can change whenever a fabric switch with an ISL link is replaced or the admin reconfigures the fabric switch with active links. In such situations, reference count updates should be applied to the correct nodelist structure. Signed-off-by: Nigel Kirkland Link: https://patch.msgid.link/20261013001648.62289-8-nkirkland2304@gmail.com Signed-off-by: Martin K. Petersen (Oracle) commit 75ae9d50b8430246871af493f02bfff38257ee7b Author: Nigel Kirkland Date: Mon Oct 12 17:16:46 2026 -0700 scsi: lpfc: Refactor calls on fc_disctmo to lpfc_set_disctmo in RSCN handler The lpfc_set_disctmo() routine is not used for all cases when the driver needs to restart discovery on the fc_disctmo timer. Not doing so, makes discovery timer actions invisible in some cases as they do not get logged. This patch substitutes calls on fc_disctmo to use lpfc_set_disctmo() in lpfc_els_rcv_rscn(). Signed-off-by: Nigel Kirkland Tested-by: Ewan D. Milne Link: https://patch.msgid.link/20261013001648.62289-7-nkirkland2304@gmail.com Signed-off-by: Martin K. Petersen (Oracle) commit 5750b941ac75ad03570923d0f17331b6d832c69e Author: Nigel Kirkland Date: Mon Oct 12 17:16:45 2026 -0700 scsi: lpfc: Rework I/O flush ordering when unloading driver The lpfc_els_abort() routine has a code path that cancels outstanding I/Os on the ELS ring when attempted aborts fail. The failed aborts are queued to a drv_cmpl_list and then cancelled after the ELS pring->txcmplq is fully traversed. However if the abort failure returns IOCB_ABORTING, then the driver should not have cancelled it. Doing so starts two threads working on the same iocb and ndlp, leading to unintended race conditions. Fix by capturing the IOCB_ABORTING return value in lpfc_els_abort() and not adding it to the list of IOCBs for cancelling. We should allow the IOCB scheduled for abort to complete naturally. This avoids simultaneous threads acting on the same IOCB and ndlp objects. The lpfc_free_iocb_list() is moved to execute after lpfc_sli4_hba_unset() allowing the routine to flush I/O before freeing it. And, in lpfc_pci_remove_one_s4() a call to flush the phba->wq is added. This makes the unload logic consistent with offline handling logic. Signed-off-by: Nigel Kirkland Tested-by: Ewan D. Milne Link: https://patch.msgid.link/20261013001648.62289-6-nkirkland2304@gmail.com Signed-off-by: Martin K. Petersen (Oracle) commit 57b0a51937ef4a94cb6c86d42136d122be841694 Author: Nigel Kirkland Date: Mon Oct 12 17:16:44 2026 -0700 scsi: lpfc: Check fc4_xpt_flags before decrementing ndlp kref on FDISC error The current initial kref count drop logic for an ndlp that fails FDISC assumes that the ndlp has never registered with transport layer and thus the lpfc_dev_loss_tmo_callbk never called. However, a failed FDISC can occur after a successful transport layer registration too. So, lpfc_dev_loss_tmo_callbk can occur and there is a potential use-after-free on the ndlp. Check ndlp->fc4_xpt_flags if previously registered with an upper layer transport and check ndlp->nlp_flags if there is a LPFC_EVT_DEV_LOSS work pending. If not previously registered nor LPFC_EVT_DEV_LOSS work pending, then set the NLP_DROPPED flag as before and decrement the initial kref on FDISC error. However, if ndlp has been previously registered, then let the pre-existing logic for each transport's respective dev_loss_tmo_callbk perform the initial kref decrement. Signed-off-by: Nigel Kirkland Link: https://patch.msgid.link/20261013001648.62289-5-nkirkland2304@gmail.com Signed-off-by: Martin K. Petersen (Oracle) commit e7e065ec672af054c50eb270b5a6b178fd46b291 Author: Nigel Kirkland Date: Mon Oct 12 17:16:43 2026 -0700 scsi: lpfc: Fix kernel oops when unmapping SCSI DMA buffers for an aborted cmd A kernel oops at dma_unmap_sg_attrs() may occur due to a race between an aborted SCSI I/O completion and a SCSI error handler issued TUR using the same repurposed scsi_cmnd structure. The LPFC_DRIVER_ABORTED cmd_flag is set when inflight I/Os are aborted via lpfc_sli_abort_taskmgmt(), and this flag is not cleared until after scsi_done() is called. The inflight I/O test is changed to check SCSI I/O for either LFPC_IO_ON_TXCMPLQ or LPFC_DRIVER_ABORTED. If either cmd_flag is set, then the I/O should still be counted. Signed-off-by: Nigel Kirkland Tested-by: Ewan D. Milne Link: https://patch.msgid.link/20261013001648.62289-4-nkirkland2304@gmail.com Signed-off-by: Martin K. Petersen (Oracle) commit 86866706d0a9bf0dc4261b6b05b7ec42459e5931 Author: Nigel Kirkland Date: Mon Oct 12 17:16:42 2026 -0700 scsi: lpfc: Early return out of lpfc_els_abort() when HBA_SETUP flag is not set It is possible that a dev_loss_tmo callback fires during an HBA reset. The ELS pring structure is cleared by the HBA reset path and the dev_loss_tmo callback executing lpfc_els_abort() could be using a stale ELS pring pointer. To significantly reduce exposure, check if HBA_SETUP flag is set before proceeding to use the ELS pring pointer in lpfc_els_abort(). There is no point to issue aborts when the SLI port is not setup anyways. Signed-off-by: Nigel Kirkland Reveiwed-by: Ewan D. Milne Tested-by: Ewan D. Milne Link: https://patch.msgid.link/20261013001648.62289-3-nkirkland2304@gmail.com Signed-off-by: Martin K. Petersen (Oracle) commit aef36d2e16f49e48e3569c547fe60edf5c2145a3 Author: Nigel Kirkland Date: Mon Oct 12 17:16:41 2026 -0700 scsi: lpfc: Fix use-after-free in lpfc_cmpl_ct_cmd_vmid() In lpfc_cmpl_ct_cmd_vmid(), there is an early call to lpfc_ct_free_iocb() when cmd is SLI_CTAS_DALLAPP_ID. Within lpfc_ct_free_iocb() the cmdiocb->rsp_dmabuf will be freed. This means any ctrsp ptr dereference for SLI_CT_RESPONSE_FS_RJT or even ctrsp->ReasonCode and ctrsp->Explanation when handling a CT LS_RJT response is a use-after-free. Remove the early lpfc_ct_free_iocb call for SLI_CTAS_DALLAPP_ID. There already is a free_res label that calls lpfc_ct_free_iocb so there doesn't need to be an early lpfc_ct_free_iocb at the start of lpfc_cmpl_ct_cmd_vmid. Signed-off-by: Nigel Kirkland Tested-by: Ewan D. Milne Link: https://patch.msgid.link/20261013001648.62289-2-nkirkland2304@gmail.com Signed-off-by: Martin K. Petersen (Oracle) commit aea9bae78b4070ea981af45f75e65f275cf85533 Author: Bart Van Assche Date: Tue Oct 13 15:10:09 2026 -0700 scsi: core: Enable lock context analysis for the scsi_debug driver Enable lock context analysis now that all lock context analysis warnings have been fixed. Reviewed-by: Christoph Hellwig Reviewed-by: John Garry Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/46613e281866679cff455c3cbab842e48ad2a3d3.1791924924.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 0f81d5ea524d1706e0eedbbaaa34bd80a95e2b1d Author: Bart Van Assche Date: Tue Oct 13 15:10:08 2026 -0700 scsi: scsi_debug: Improve lock context annotations Prepare the scsi_debug driver for enabling compiler-based lock context analysis: - Annotate the lock and unlock helper functions with __acquires, __releases, __acquires_shared, and __releases_shared. - Add __acquire() and __release() calls in the paths that do not match the __acquires() / __releases() annotations. - Annotate sdeb_meta_{read,write}_{,un}lock() with __context_unsafe() because adding __acquire() and __release() calls in these functions is not possible without triggering undefined behavior (taking the address of a member of a structure with a NULL pointer as base address). Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/1775809e31b535cc42f3f79e75f28666e74a98f7.1791924924.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 20a26ca89e7175b9dc1f9e1454585a4a5b6aac95 Author: Bart Van Assche Date: Tue Oct 13 15:10:07 2026 -0700 scsi: scsi_debug: Split resp_atomic_write() Prepare for enabling lock context analysis by eliminating conditional locking. Reviewed-by: Christoph Hellwig Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/bd623851c07c80b3f1bff493e66dc268656e9883.1791924924.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 6544f731e470028b3832986ed13eeac332b823f8 Author: Bart Van Assche Date: Tue Oct 13 15:10:06 2026 -0700 scsi: scsi_debug: Split resp_write_dt0() Prepare for enabling lock context analysis by eliminating conditional locking. Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/ef20891477dd7eac3874945660caec278893a619.1791924924.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 06c3166f2566a3f5407077fff046d1ad3ed9fcfe Author: Bart Van Assche Date: Tue Oct 13 15:10:05 2026 -0700 scsi: scsi_debug: Split resp_read_dt0() Split this function to remove conditional locking. This patch prepares for enabling context analysis. Reviewed-by: Christoph Hellwig Reviewed-by: John Garry Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/eea4ce8d6ddc86a401570f09a559a3b3c50e78ff.1791924924.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 06bce26589f430b620c9a6041a4e04b378586def Author: Bart Van Assche Date: Tue Oct 13 15:10:04 2026 -0700 scsi: scsi_debug: Split corrupt_lbas() Move the inner logic of corrupt_lbas() into a new helper function __corrupt_lbas() and call it from separate locked and unlocked branches in corrupt_lbas(). This patch prepares for enabling context analysis. Reviewed-by: Christoph Hellwig Reviewed-by: John Garry Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/fe8629d9d7d0a54e8c5c14539953b40c09a6855a.1791924924.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 2bc11c1d4571c7a2fd302dc26e984c2079798c75 Author: Bart Van Assche Date: Tue Oct 13 15:10:03 2026 -0700 scsi: scsi_debug: Split resp_write_same() Since the Clang thread-safety analyzer does not support conditional locking, split the function resp_write_same() such that all locking statements end up in the same branch of an if-statement. Reviewed-by: Christoph Hellwig Reviewed-by: John Garry Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/1127ce1be450f0c4503845b41eaa24c27aba373a.1791924924.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit 2f50ca3d46b4d5916874ba19612498c0a9c1f5f9 Author: Bart Van Assche Date: Tue Oct 13 15:10:02 2026 -0700 scsi: scsi_debug: Fix a locking bug in resp_write_same() If fetch_to_dev_buffer() fails in resp_write_same(), the function jumps to 'out' without releasing the data write lock acquired earlier via sdeb_data_write_lock(). Jump to 'unlock' instead so that sdeb_data_write_unlock() is called on the error path. This bug has been discovered by building the scsi_debug driver with Clang and modified lock context annotations. The modified lock context annotations are available in patch "scsi: scsi_debug: Improve lock context annotations". Fixes: 84f3a3c01d70 ("scsi: scsi_debug: Atomic write support") Reviewed-by: Christoph Hellwig Reviewed-by: John Garry Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/271ea11d3bc147d950a89419181f0c3f5a1ebf3b.1791924924.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) commit beba4caa4550288dd617f428bd5037b51527e32c Author: Stanley Jhu Date: Mon Oct 12 20:00:59 2026 +0800 scsi: ufs: docs: Describe how to test with QEMU QEMU emulates a UFS host controller and logical units, but the kernel tree does not mention it, so developers without UFS hardware have no documented way to exercise the UFS core. Add a short section with the required kernel options, an example QEMU command line, and what the emulation does not cover. Signed-off-by: Stanley Jhu Reviewed-by: Bean Huo Link: https://patch.msgid.link/20261012120059.1371653-1-stanleyjhu@google.com Signed-off-by: Martin K. Petersen (Oracle) commit fb20fe062b008eba371c5265440b6bbad5690405 Author: Andy Shevchenko Date: Tue Oct 13 11:59:24 2026 +0200 scsi: ufs: ufs-qcom: Don't define variable in the middle of the code While the C11 allows us to define variables in the code, we do not do this style (see more at [1]). Move the declaration to the top of the function. Link: https://lore.kernel.org/lkml/58fd478f408a34b578ee8d949c5c4b4da4d4f41d.camel@HansenPartnership.com/ [1] Signed-off-by: Andy Shevchenko Reviewed-by: Konrad Dybcio Link: https://patch.msgid.link/20261013095924.959455-1-andriy.shevchenko@linux.intel.com Signed-off-by: Martin K. Petersen (Oracle) commit e7d41f493e736fdf6d1fba40f0f24e9f4bfe6337 Author: Bean Huo Date: Tue Oct 6 10:29:07 2026 +0200 scsi: MAINTAINERS: Add Bean Huo and Stanley Jhu as UFS reviewers Bean Huo and Stanley Jhu have been contributing to and reviewing changes in the UFS subsystem for a number of years, and would like to help share the review load going forward. Add both as reviewers (R:) for the UFS subsystem. Signed-off-by: Bean Huo Acked-by: Stanley Jhu Link: https://patch.msgid.link/20261006082907.3405554-1-beanhuo@iokpp.de Signed-off-by: Martin K. Petersen (Oracle)