mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
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 <bvanassche@acm.org> Link: https://patch.msgid.link/4cafc1018d9a072df3952488ca0bf4ffb7410be7.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
This commit is contained in:
parent
9495fadabe
commit
89cb9bbfcb
|
|
@ -1,4 +1,7 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
CONTEXT_ANALYSIS := y
|
||||
|
||||
bnx2i-y := bnx2i_init.o bnx2i_hwi.o bnx2i_iscsi.o bnx2i_sysfs.o
|
||||
|
||||
obj-$(CONFIG_SCSI_BNX2_ISCSI) += bnx2i.o
|
||||
|
|
|
|||
|
|
@ -405,6 +405,11 @@ int bnx2i_send_iscsi_tmf(struct bnx2i_conn *bnx2i_conn,
|
|||
switch (tmfabort_hdr->flags & ISCSI_FLAG_TM_FUNC_MASK) {
|
||||
case ISCSI_TM_FUNC_ABORT_TASK:
|
||||
case ISCSI_TM_FUNC_TASK_REASSIGN:
|
||||
/*
|
||||
* TODO: hold session->back_lock around the iscsi_itt_to_task()
|
||||
* call below.
|
||||
*/
|
||||
__assume_ctx_lock(&session->back_lock);
|
||||
ctask = iscsi_itt_to_task(session, conn, tmfabort_hdr->rtt);
|
||||
if (!ctask || !ctask->sc)
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -1154,6 +1154,7 @@ static void bnx2i_cpy_scsi_cdb(struct scsi_cmnd *sc, struct bnx2i_cmd *cmd)
|
|||
}
|
||||
|
||||
static void bnx2i_cleanup_task(struct iscsi_task *task)
|
||||
__must_hold(&task->conn->session->back_lock)
|
||||
{
|
||||
struct iscsi_conn *conn = task->conn;
|
||||
struct bnx2i_conn *bnx2i_conn = conn->dd_data;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user