From: Jayamohan Kallickal <jayamohank@gmail.com>
To: jbottomley@parallels.com, linux-scsi@vger.kernel.org,
michaelc@cs.wisc.edu
Cc: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>,
John Soni Jose <sony.john-n@emulex.com>
Subject: [PATCH 02/22] be2iscsi: Fix the MCCQ count leakage
Date: Thu, 12 Sep 2013 22:09:52 -0700 [thread overview]
Message-ID: <1379049014-32716-2-git-send-email-jayamohan.kallickal@emulex.com> (raw)
In-Reply-To: <1379049014-32716-1-git-send-email-jayamohan.kallickal@emulex.com>
When MBX CMD is posted in MCCQ and if command times out,during
mccq resource cleanup for the timed out command mccq->count
was not decremented. The led to BUG_ON being hit.
Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
---
drivers/scsi/be2iscsi/be_cmds.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/be2iscsi/be_cmds.c b/drivers/scsi/be2iscsi/be_cmds.c
index bb70dcb..f7788e5 100644
--- a/drivers/scsi/be2iscsi/be_cmds.c
+++ b/drivers/scsi/be2iscsi/be_cmds.c
@@ -174,6 +174,10 @@ int beiscsi_mccq_compl(struct beiscsi_hba *phba,
BEISCSI_LOG_CONFIG,
"BC_%d : MBX Cmd Completion timed out\n");
rc = -EAGAIN;
+
+ /* decrement the mccq used count */
+ atomic_dec(&phba->ctrl.mcc_obj.q.used);
+
goto release_mcc_tag;
} else
rc = 0;
@@ -699,7 +703,7 @@ struct be_mcc_wrb *wrb_from_mccq(struct beiscsi_hba *phba)
struct be_queue_info *mccq = &phba->ctrl.mcc_obj.q;
struct be_mcc_wrb *wrb;
- BUG_ON(atomic_read(&mccq->used) >= mccq->len);
+ WARN_ON(atomic_read(&mccq->used) >= mccq->len);
wrb = queue_head_node(mccq);
memset(wrb, 0, sizeof(*wrb));
wrb->tag0 = (mccq->head & 0x000000FF) << 16;
--
1.7.10.4
next prev parent reply other threads:[~2013-09-13 5:36 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-13 5:09 [PATCH 01/22] be2iscsi: Fix Template HDR IOCTL Jayamohan Kallickal
2013-09-13 5:09 ` Jayamohan Kallickal [this message]
2013-09-13 5:09 ` [PATCH 03/22] be2iscsi: Fix repeated issue of MAC ADDR get IOCTL Jayamohan Kallickal
2013-09-13 5:09 ` [PATCH 04/22] be2iscsi: Fix negotiated parameters upload to FW Jayamohan Kallickal
2013-09-17 2:58 ` Mike Christie
2013-09-17 4:28 ` Jayamohan Kallickal
2013-09-17 21:15 ` Mike Christie
2013-09-18 5:37 ` Jayamohan Kallickal
2013-09-18 7:34 ` Mike Christie
2013-09-17 21:23 ` Mike Christie
2013-09-13 5:09 ` [PATCH 05/22] be2iscsi: Fix locking mechanism in Unsol Path Jayamohan Kallickal
2013-09-13 5:09 ` [PATCH 06/22] be2iscsi: Fix soft lock up issue during UE or if FW taking time to respond Jayamohan Kallickal
2013-09-17 3:18 ` Mike Christie
2013-09-13 5:09 ` [PATCH 07/22] be2iscsi: Config parameters update for Dual Chute Support Jayamohan Kallickal
2013-09-13 5:09 ` [PATCH 08/22] be2iscsi: Fix changes in ASYNC Path for SKH-R adapter Jayamohan Kallickal
2013-09-13 5:09 ` [PATCH 09/22] be2iscsi: Fix Template HDR support for Dual Chute mode Jayamohan Kallickal
2013-09-13 5:10 ` [PATCH 10/22] be2iscsi: Fix SGL Initilization and posting Pages for Dual Chute Jayamohan Kallickal
2013-09-13 5:10 ` [PATCH 11/22] be2iscsi: Fix WRB_Q posting to support Dual Chute mode Jayamohan Kallickal
2013-09-13 5:10 ` [PATCH 12/22] be2iscsi: Fix CID allocation/freeing to support Dual Chute Mode Jayamohan Kallickal
2013-09-13 5:10 ` [PATCH 13/22] be2iscsi: Fix connection offload to support Dual Chute Jayamohan Kallickal
2013-09-13 5:10 ` [PATCH 14/22] be2iscsi: Fix chute cleanup during drivers unload Jayamohan Kallickal
2013-09-13 5:10 ` [PATCH 15/22] be2iscsi: Dispaly CID available for connection offload Jayamohan Kallickal
2013-09-13 5:10 ` [PATCH 16/22] be2iscsi: Display Port Identifier for each iSCSI function Jayamohan Kallickal
2013-09-13 5:10 ` [PATCH 17/22] be2iscsi: Fix MSIx creation for SKH-R adapter Jayamohan Kallickal
2013-09-13 5:10 ` [PATCH 18/22] be2iscsi: Fix log level for protocol specific logs Jayamohan Kallickal
2013-09-13 5:10 ` [PATCH 19/22] be2iscsi: Fix Insufficient Buffer Error returned in MBX Completion Jayamohan Kallickal
2013-09-13 5:10 ` [PATCH 20/22] be2iscsi: Invalidate WRB in Abort/Reset Path Jayamohan Kallickal
2013-09-13 5:10 ` [PATCH 21/22] be2iscsi: Fix AER handling in driver Jayamohan Kallickal
2013-09-13 5:10 ` [PATCH 22/22] be2iscsi: Bump driver version Jayamohan Kallickal
2013-09-13 5:10 ` [PATCH 00/22] be2iscsi: Update to 10.0.635.0 Jayamohan Kallickal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1379049014-32716-2-git-send-email-jayamohan.kallickal@emulex.com \
--to=jayamohank@gmail.com \
--cc=jayamohan.kallickal@emulex.com \
--cc=jbottomley@parallels.com \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
--cc=sony.john-n@emulex.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox