Patch "scsi: qedi: Fix possible memory leak in qedi_iscsi_update_conn()" has been added to the 4.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    scsi: qedi: Fix possible memory leak in qedi_iscsi_update_conn()

to the 4.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     scsi-qedi-fix-possible-memory-leak-in-qedi_iscsi_update_conn.patch
and it can be found in the queue-4.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 8b9b22ba75907dcced88c815a5427ec0b4298aec Mon Sep 17 00:00:00 2001
From: Wei Yongjun <weiyongjun1@xxxxxxxxxx>
Date: Tue, 7 Feb 2017 14:52:58 +0000
Subject: scsi: qedi: Fix possible memory leak in qedi_iscsi_update_conn()

From: Wei Yongjun <weiyongjun1@xxxxxxxxxx>

commit 8b9b22ba75907dcced88c815a5427ec0b4298aec upstream.

'conn_info' is malloced in qedi_iscsi_update_conn() and should be freed
before leaving from the error handling cases, otherwise it will cause
memory leak.

Fixes: ace7f46ba5fd ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.")
Signed-off-by: Wei Yongjun <weiyongjun1@xxxxxxxxxx>
Acked-by: Manish Rangankar <Manish.Rangankar@xxxxxxxxxx>
Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 drivers/scsi/qedi/qedi_iscsi.c |    4 ----
 1 file changed, 4 deletions(-)

--- a/drivers/scsi/qedi/qedi_iscsi.c
+++ b/drivers/scsi/qedi/qedi_iscsi.c
@@ -453,13 +453,9 @@ static int qedi_iscsi_update_conn(struct
 	if (rval) {
 		rval = -ENXIO;
 		QEDI_ERR(&qedi->dbg_ctx, "Could not update connection\n");
-		goto update_conn_err;
 	}
 
 	kfree(conn_info);
-	rval = 0;
-
-update_conn_err:
 	return rval;
 }
 


Patches currently in stable-queue which might be from weiyongjun1@xxxxxxxxxx are

queue-4.10/scsi-qedi-fix-possible-memory-leak-in-qedi_iscsi_update_conn.patch
queue-4.10/spi-armada-3700-remove-spi_master_put-in-a3700_spi_remove.patch



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]