mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
[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 <[email protected]> Tested-by: Ross Brattain <[email protected]> Signed-off-by: Robert Love <[email protected]> Signed-off-by: James Bottomley <[email protected]>
This commit is contained in:
parent
00fa2b191b
commit
fe5e3f1aec
1 changed files with 1 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue