linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manish Rangankar <mrangankar@marvell.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
	"QLogic-Storage-Upstream@qlogic.com" 
	<QLogic-Storage-Upstream@qlogic.com>,
	David Somayajulu <david.somayajulu@qlogic.com>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>
Subject: RE: [PATCH] iscsi: qla4xxx: fix double free in probe
Date: Wed, 4 Dec 2019 15:08:04 +0000	[thread overview]
Message-ID: <MN2PR18MB3022879D8451A01AC7B0894FD85D0@MN2PR18MB3022.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20191203094421.hw7ex7qr3j2rbsmx@kili.mountain>


> -----Original Message-----
> From: linux-scsi-owner@vger.kernel.org <linux-scsi-
> owner@vger.kernel.org> On Behalf Of Dan Carpenter
> Sent: Tuesday, December 3, 2019 3:15 PM
> To: QLogic-Storage-Upstream@qlogic.com; David Somayajulu
> <david.somayajulu@qlogic.com>
> Cc: James E.J. Bottomley <jejb@linux.ibm.com>; Martin K. Petersen
> <martin.petersen@oracle.com>; linux-scsi@vger.kernel.org; kernel-
> janitors@vger.kernel.org
> Subject: [PATCH] iscsi: qla4xxx: fix double free in probe
> 
> On this error path we call qla4xxx_mem_free() and then the caller also calls
> qla4xxx_free_adapter() which calls qla4xxx_mem_free().  It leads to a couple
> double frees:
> 
> drivers/scsi/qla4xxx/ql4_os.c:8856 qla4xxx_probe_adapter() warn: 'ha-
> >chap_dma_pool' double freed
> drivers/scsi/qla4xxx/ql4_os.c:8856 qla4xxx_probe_adapter() warn: 'ha-
> >fw_ddb_dma_pool' double freed
> 
> Fixes: afaf5a2d341d ("[SCSI] Initial Commit of qla4xxx")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
>  drivers/scsi/qla4xxx/ql4_os.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
> index 8c674eca09f1..2323432a0edb 100644
> --- a/drivers/scsi/qla4xxx/ql4_os.c
> +++ b/drivers/scsi/qla4xxx/ql4_os.c
> @@ -4275,7 +4275,6 @@ static int qla4xxx_mem_alloc(struct
> scsi_qla_host *ha)
>  	return QLA_SUCCESS;
> 
>  mem_alloc_error_exit:
> -	qla4xxx_mem_free(ha);
>  	return QLA_ERROR;
>  }
> 
> --
> 2.11.0

Thanks
Acked-by: Manish Rangankar <mrangankar@marvell.com>

  reply	other threads:[~2019-12-04 15:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-03  9:45 [PATCH] iscsi: qla4xxx: fix double free in probe Dan Carpenter
2019-12-04 15:08 ` Manish Rangankar [this message]
2019-12-10  0:02 ` Martin K. Petersen

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=MN2PR18MB3022879D8451A01AC7B0894FD85D0@MN2PR18MB3022.namprd18.prod.outlook.com \
    --to=mrangankar@marvell.com \
    --cc=QLogic-Storage-Upstream@qlogic.com \
    --cc=dan.carpenter@oracle.com \
    --cc=david.somayajulu@qlogic.com \
    --cc=jejb@linux.ibm.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /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).