From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:42258 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752614AbdEIJWZ (ORCPT ); Tue, 9 May 2017 05:22:25 -0400 Subject: Patch "scsi: qedi: Fix possible memory leak in qedi_iscsi_update_conn()" has been added to the 4.10-stable tree To: weiyongjun1@huawei.com, Manish.Rangankar@cavium.com, gregkh@linuxfoundation.org, martin.petersen@oracle.com Cc: , From: Date: Tue, 09 May 2017 11:20:53 +0200 Message-ID: <1494321653204127@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: 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 know about it. >>From 8b9b22ba75907dcced88c815a5427ec0b4298aec Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Tue, 7 Feb 2017 14:52:58 +0000 Subject: scsi: qedi: Fix possible memory leak in qedi_iscsi_update_conn() From: Wei Yongjun 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 Acked-by: Manish Rangankar Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- 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@huawei.com 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