All of lore.kernel.org
 help / color / mirror / Atom feed
From: Himanshu Madhani <himanshu.madhani@qlogic.com>
To: jbottomley@parallels.com
Cc: hch@lst.de, giridhar.malavali@qlogic.com,
	himanshu.madhani@qlogic.com, andrew.vasquez@qlogic.com,
	linux-scsi@vger.kernel.org
Subject: [PATCH  10/14] qla2xxx: Remove decrement of sp reference count in abort handler.
Date: Tue, 4 Aug 2015 13:38:00 -0400	[thread overview]
Message-ID: <1438709884-623-11-git-send-email-himanshu.madhani@qlogic.com> (raw)
In-Reply-To: <1438709884-623-1-git-send-email-himanshu.madhani@qlogic.com>

From: Chad Dupuis <chad.dupuis@qlogic.com>

Fix for memory leak when command is not found by firmware due to
mismatch in sp reference count.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_os.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 8208f6a0..55a53ed 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -967,14 +967,9 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
 	spin_unlock_irqrestore(&ha->hardware_lock, flags);
 	rval = ha->isp_ops->abort_command(sp);
 	if (rval) {
-		if (rval == QLA_FUNCTION_PARAMETER_ERROR) {
-			/*
-			 * Decrement the ref_count since we can't find the
-			 * command
-			 */
-			atomic_dec(&sp->ref_count);
+		if (rval == QLA_FUNCTION_PARAMETER_ERROR)
 			ret = SUCCESS;
-		} else
+		else
 			ret = FAILED;
 
 		ql_dbg(ql_dbg_taskm, vha, 0x8003,
-- 
1.7.7


  parent reply	other threads:[~2015-08-04 18:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-04 17:37 [PATCH 00/14] qla2xxx: Patches for scsi "misc" branch Himanshu Madhani
2015-08-04 17:37 ` [PATCH 01/14] qla2xxx: Add serdes register read/write support for ISP25xx Himanshu Madhani
2015-08-04 17:37 ` [PATCH 02/14] qla2xxx: Handle AEN8014 incoming port logout Himanshu Madhani
2015-08-04 17:37 ` [PATCH 03/14] qla2xxx: Use ssdid to gate semaphore manipulation Himanshu Madhani
2015-08-04 17:37 ` [PATCH 04/14] qla2xxx: Pause risc before manipulating risc semaphore Himanshu Madhani
2015-08-04 17:37 ` [PATCH 05/14] qla2xxx: Add adapter checks for FAWWN functionality Himanshu Madhani
2015-08-04 17:37 ` [PATCH 06/14] qla2xxx: Do not crash system for sp ref count zero Himanshu Madhani
2015-08-04 17:37 ` [PATCH 07/14] qla2xxx: Do not reset adapter if SRB handle is in range Himanshu Madhani
2015-08-04 17:37 ` [PATCH 08/14] qla2xxx: Do not reset ISP for error entry with an out of range handle Himanshu Madhani
2015-08-04 17:37 ` [PATCH 09/14] qla2xxx: Add support to show MPI and PEP FW version for ISP27xx Himanshu Madhani
2015-08-04 17:38 ` Himanshu Madhani [this message]
2015-08-04 17:38 ` [PATCH 11/14] qla2xxx: do not clear slot in outstanding cmd array Himanshu Madhani
2015-08-04 17:38 ` [PATCH 12/14] qla2xxx: Fix missing device login retries Himanshu Madhani
2015-08-04 17:38 ` [PATCH 13/14] qla2xxx: Add pci device id 0x2261 Himanshu Madhani
2015-08-04 17:38 ` [PATCH 14/14] qla2xxx: Update driver version to 8.07.00.26-k Himanshu Madhani

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=1438709884-623-11-git-send-email-himanshu.madhani@qlogic.com \
    --to=himanshu.madhani@qlogic.com \
    --cc=andrew.vasquez@qlogic.com \
    --cc=giridhar.malavali@qlogic.com \
    --cc=hch@lst.de \
    --cc=jbottomley@parallels.com \
    --cc=linux-scsi@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.