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 <bvanassche@acm.org>
Link: https://patch.msgid.link/e663e2d47afc8727991838bbfa29bb5ab21b38b8.1790360262.git.bvanassche@acm.org
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
This commit is contained in:
Bart Van Assche 2026-09-25 11:25:53 -07:00 committed by Martin K. Petersen (Oracle)
parent 901ade3fa1
commit f3e83f6587
2 changed files with 8 additions and 0 deletions

View File

@ -1,4 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only
CONTEXT_ANALYSIS := y
ccflags-y += -I $(srctree)/drivers/net/ethernet/chelsio/libcxgb
obj-$(CONFIG_SCSI_CXGB3_ISCSI) += libcxgbi.o cxgb3i/

View File

@ -1540,6 +1540,11 @@ skb_read_pdu_bhs(struct cxgbi_sock *csk, struct iscsi_conn *conn,
struct iscsi_task *task;
u32 data_sn;
/*
* TODO: hold session->back_lock around the iscsi_itt_to_task()
* call below.
*/
__assume_ctx_lock(&conn->session->back_lock);
task = iscsi_itt_to_ctask(conn->session, conn, itt);
data_sn = be32_to_cpu(((struct iscsi_data *)skb->data)->datasn);
if (task && task->sc) {