linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Love <robert.w.love@intel.com>
To: linux-scsi@vger.kernel.org
Cc: Hillf Danton <dhillf@gmail.com>
Subject: [PATCH 3/8] libfc: fix mm leak in handling incoming request for target discovery
Date: Mon, 16 May 2011 16:45:35 -0700	[thread overview]
Message-ID: <20110516234535.24502.33714.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20110516234519.24502.22027.stgit@localhost6.localdomain6>

From: Hillf Danton <dhillf@gmail.com>

When handling incoming request, if the operation code carried by the
received frame is not RSCN, the frame should be freed as in the RSCN
case, or there is memory leakage.

Signed-off-by: Hillf Danton <dhillf@gmail.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
---
 drivers/scsi/libfc/fc_disc.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
index 911b273..b9cb814 100644
--- a/drivers/scsi/libfc/fc_disc.c
+++ b/drivers/scsi/libfc/fc_disc.c
@@ -205,6 +205,7 @@ static void fc_disc_recv_req(struct fc_lport *lport, struct fc_frame *fp)
 	default:
 		FC_DISC_DBG(disc, "Received an unsupported request, "
 			    "the opcode is (%x)\n", op);
+		fc_frame_free(fp);
 		break;
 	}
 }


  parent reply	other threads:[~2011-05-16 23:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-16 23:45 [PATCH 0/8] libfc, libfcoe and fcoe patches for 2.6.40 Robert Love
2011-05-16 23:45 ` [PATCH 1/8] libfcoe: Incorrect CVL handling for NPIV ports Robert Love
2011-05-16 23:45 ` [PATCH 2/8] fcoe: Prevent creation of an NPIV port with duplicate WWPN Robert Love
2011-05-16 23:45 ` Robert Love [this message]
2011-05-16 23:45 ` [PATCH 4/8] libfc: release DDP context if frame_send() fails Robert Love
2011-05-16 23:45 ` [PATCH 5/8] libfc: don't call resp handler after FC_EX_TIMEOUT Robert Love
2011-05-16 23:45 ` [PATCH 6/8] libfc: fix race in SRR response Robert Love
2011-05-16 23:45 ` [PATCH 7/8] libfc: do not immediately retry the cmd when seq_send fails in fc_fcp_send_data Robert Love
2011-05-16 23:46 ` [PATCH 8/8] libfcoe: Remove unnecessary module state checks 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=20110516234535.24502.33714.stgit@localhost6.localdomain6 \
    --to=robert.w.love@intel.com \
    --cc=dhillf@gmail.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 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).