diff options
author | Eddie Wai <eddie.wai@broadcom.com> | 2010-11-24 00:29:21 +0100 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-12-21 19:24:10 +0100 |
commit | 8eea2f55a65b9471276e78e5c86ddd19c4c0365c (patch) | |
tree | 5b40a3401d20d6d40ce22e86307e3252a3e7b67d /drivers | |
parent | [SCSI] bnx2i: Fixed bugs in the handling of unsolicited NOP-Ins (diff) | |
download | linux-8eea2f55a65b9471276e78e5c86ddd19c4c0365c.tar.xz linux-8eea2f55a65b9471276e78e5c86ddd19c4c0365c.zip |
[SCSI] bnx2i: Added fix for NOP-Out response panic from unsolicited NOP-In
The patch fixes the following situations where NOP-Out pkt is called for:
- local unsolicited NOP-Out requests (requesting no NOP-In response)
- local NOP-Out responses to unsolicited NOP-In requests
kernel panic is observed due to double session spin_lock requests; one in the
bnx2i_process_nopin_local_cmpl routine in bnx2i_hwi.c and the other in the
iscsi_put_task routine in libiscsi.c
The proposed fix is to export the currently static __iscsi_put_task() routine
and have bnx2i call it directly instead of the iscsi_put_task() routine which
holds the session spin lock.
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Anil Veerabhadrappa <anilgv@broadcom.com>
Acked-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/bnx2i/bnx2i_hwi.c | 2 | ||||
-rw-r--r-- | drivers/scsi/libiscsi.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c b/drivers/scsi/bnx2i/bnx2i_hwi.c index 16c76e0b2318..32cf9306ffcb 100644 --- a/drivers/scsi/bnx2i/bnx2i_hwi.c +++ b/drivers/scsi/bnx2i/bnx2i_hwi.c @@ -1513,7 +1513,7 @@ static void bnx2i_process_nopin_local_cmpl(struct iscsi_session *session, task = iscsi_itt_to_task(conn, nop_in->itt & ISCSI_NOP_IN_MSG_INDEX); if (task) - iscsi_put_task(task); + __iscsi_put_task(task); spin_unlock(&session->lock); } diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index c15fde808c33..7551abe40900 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c @@ -539,11 +539,12 @@ void __iscsi_get_task(struct iscsi_task *task) } EXPORT_SYMBOL_GPL(__iscsi_get_task); -static void __iscsi_put_task(struct iscsi_task *task) +void __iscsi_put_task(struct iscsi_task *task) { if (atomic_dec_and_test(&task->refcount)) iscsi_free_task(task); } +EXPORT_SYMBOL_GPL(__iscsi_put_task); void iscsi_put_task(struct iscsi_task *task) { |