summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc
diff options
context:
space:
mode:
authorParikh, Neerav <neerav.parikh@intel.com>2011-02-25 15:02:51 -0800
committerJames Bottomley <James.Bottomley@suse.de>2011-02-28 18:28:45 -0600
commitfe5e3f1aec310779a4b830022a26842b8d587228 (patch)
tree03de79c89ad0a9d725e7bca2b952a7279e8ff135 /drivers/scsi/libfc
parent00fa2b191b4bd74e9d22ac177e3d9e8ecd3582d3 (diff)
downloadop-kernel-dev-fe5e3f1aec310779a4b830022a26842b8d587228.zip
op-kernel-dev-fe5e3f1aec310779a4b830022a26842b8d587228.tar.gz
[SCSI] libfc: Fixing a memory leak when destroying an interface
When an fcoe interface is being destroyed; in the process the fcoe driver will try to release all the resources it had allocated for that interface including rports. But, it seems that it does not release the reference held for the name server rport in that process resulting into a memory leak. This patch fixes that memory leak. 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> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/libfc')
-rw-r--r--drivers/scsi/libfc/fc_rport.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index 59b16bb..49e1ccc 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -357,6 +357,7 @@ static void fc_rport_work(struct work_struct *work)
if (port_id == FC_FID_DIR_SERV) {
rdata->event = RPORT_EV_NONE;
mutex_unlock(&rdata->rp_mutex);
+ kref_put(&rdata->kref, lport->tt.rport_destroy);
} else if ((rdata->flags & FC_RP_STARTED) &&
rdata->major_retries <
lport->max_rport_retry_count) {
OpenPOWER on IntegriCloud