linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Love <robert.w.love@intel.com>
To: James.Bottomley@suse.de, linux-scsi@vger.kernel.org
Cc: Ross Brattain <ross.b.brattain@intel.com>
Subject: [PATCH 2/8] Revert "[SCSI] libfc: fix exchange being deleted when the abort itself is timed out"
Date: Fri, 25 Feb 2011 15:02:56 -0800	[thread overview]
Message-ID: <20110225230256.9310.25478.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20110225230245.9310.81462.stgit@localhost6.localdomain6>

From: Parikh, Neerav <neerav.parikh@intel.com>

When abort for an exchange timed out it didn't release the reference to
the exchange resulting in a memory leak.

After discussion with the author of the patch (CC) that introduced this
bug it was suggested to revert that patch.

This reverts commit ea3e2e72eeb3e8a9440a5da965914f9b12088626.

Signed-off by: Neerav Parikh <Neerav.Parikh@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>

Signed-off-by: Robert Love <robert.w.love@intel.com>
---
 drivers/scsi/libfc/fc_exch.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
index 08bf5fa..10a5436 100644
--- a/drivers/scsi/libfc/fc_exch.c
+++ b/drivers/scsi/libfc/fc_exch.c
@@ -666,13 +666,10 @@ static void fc_exch_timeout(struct work_struct *work)
 		if (e_stat & ESB_ST_ABNORMAL)
 			rc = fc_exch_done_locked(ep);
 		spin_unlock_bh(&ep->ex_lock);
+		if (!rc)
+			fc_exch_delete(ep);
 		if (resp)
 			resp(sp, ERR_PTR(-FC_EX_TIMEOUT), arg);
-		if (!rc) {
-			/* delete the exchange if it's already being aborted */
-			fc_exch_delete(ep);
-			return;
-		}
 		fc_seq_exch_abort(sp, 2 * ep->r_a_tov);
 		goto done;
 	}


  parent reply	other threads:[~2011-02-25 23:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-25 23:02 [PATCH 0/8] libfc, libfcoe and fcoe updates for scsi-misc Robert Love
2011-02-25 23:02 ` [PATCH 1/8] libfc: Fixing a memory leak when destroying an interface Robert Love
2011-02-25 23:02 ` Robert Love [this message]
2011-02-25 23:03 ` [PATCH 3/8] fcoe, libfc: initialize EM anchors list and then update npiv EMs Robert Love
2011-02-25 23:03 ` [PATCH 4/8] libfc: introduce __fc_fill_fc_hdr that accepts fc_hdr as an argument Robert Love
2011-02-25 23:03 ` [PATCH 5/8] libfcoe: Move FCOE_MTU definition from fcoe.h to libfcoe.h Robert Love
2011-02-25 23:03 ` [PATCH 6/8] libfcoe: Remove stale fcoe-netdev entries Robert Love
2011-02-25 23:03 ` [PATCH 7/8] fcoe: precedence bug in fcoe_filter_frames() Robert Love
2011-02-25 23:03 ` [PATCH 8/8] fcoe: fix broken fcoe interface reset Robert Love

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=20110225230256.9310.25478.stgit@localhost6.localdomain6 \
    --to=robert.w.love@intel.com \
    --cc=James.Bottomley@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=ross.b.brattain@intel.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;
as well as URLs for NNTP newsgroup(s).