From: Mike Christie <michaelc@cs.wisc.edu>
To: vikas.chaudhary@qlogic.com
Cc: jbottomley@parallels.com, linux-scsi@vger.kernel.org,
lalit.chandivade@qlogic.com
Subject: Re: [PATCH 09/10] qla4xxx: Fix memory leak in func qla4_84xx_config_acb()
Date: Mon, 31 Mar 2014 00:39:02 -0500 [thread overview]
Message-ID: <5338FF76.9050103@cs.wisc.edu> (raw)
In-Reply-To: <1393297625-928-10-git-send-email-vikas.chaudhary@qlogic.com>
On 02/24/2014 09:07 PM, vikas.chaudhary@qlogic.com wrote:
> From: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
>
> Use correct goto statement to free dma memory in case of
> failure in function qla4_84xx_config_acb()
>
> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
> ---
> drivers/scsi/qla4xxx/ql4_mbx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c
> index 0a6b782..1345c0e 100644
> --- a/drivers/scsi/qla4xxx/ql4_mbx.c
> +++ b/drivers/scsi/qla4xxx/ql4_mbx.c
> @@ -2381,7 +2381,7 @@ int qla4_84xx_config_acb(struct scsi_qla_host *ha, int acb_config)
> ql4_printk(KERN_ERR, ha, "%s: Unable to alloc acb\n",
> __func__);
> rval = QLA_ERROR;
> - goto exit_config_acb;
> + goto exit_free_acb;
> }
> memcpy(ha->saved_acb, acb, acb_len);
> break;
>
This patch looks ok, but is it possible to still leak the ha->saved_acb
still? If you were going to do ACB_CONFIG_SET but the dma_alloc_coherent
failed then it would not be freed.
next prev parent reply other threads:[~2014-03-31 5:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-25 3:06 [PATCH 00/10] qla4xxx: 5.04.00-k5: Updates for scsi "misc" branch vikas.chaudhary
2014-02-25 3:06 ` [PATCH 01/10] qla4xxx: Do not wait for IO completion, after issuing stop_firmware vikas.chaudhary
2014-03-28 1:06 ` Mike Christie
2014-03-28 2:03 ` Tej Parkash
2014-02-25 3:06 ` [PATCH 02/10] qla4xxx: Change default capture to firmware defined capture mask vikas.chaudhary
2014-02-25 3:06 ` [PATCH 03/10] qla4xxx: Add support of 0xFF capture mask for minidump vikas.chaudhary
2014-02-25 3:06 ` [PATCH 04/10] qla4xxx: Added new opcodes for 84XX Minidump template vikas.chaudhary
2014-02-25 3:07 ` [PATCH 05/10] qla4xxx: Added PEX DMA Support for ISP8022 Adapter vikas.chaudhary
2014-02-25 3:07 ` [PATCH 06/10] qla4xxx: qla4xxx: Move qla4_8xxx_ms_mem_write_128b to ql4_nx.c vikas.chaudhary
2014-02-25 3:07 ` [PATCH 07/10] qla4xxx: Check for correct return status vikas.chaudhary
2014-02-25 3:07 ` [PATCH 08/10] qla4xxx: Initialize hardware queue for ISP40XX vikas.chaudhary
2014-02-25 3:07 ` [PATCH 09/10] qla4xxx: Fix memory leak in func qla4_84xx_config_acb() vikas.chaudhary
2014-03-31 5:39 ` Mike Christie [this message]
2014-02-25 3:07 ` [PATCH 10/10] qla4xxx: Update driver version to 5.04.00-k5 vikas.chaudhary
2014-05-08 21:27 ` [PATCH 00/10] qla4xxx: 5.04.00-k5: Updates for scsi "misc" branch Mike Christie
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=5338FF76.9050103@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--cc=jbottomley@parallels.com \
--cc=lalit.chandivade@qlogic.com \
--cc=linux-scsi@vger.kernel.org \
--cc=vikas.chaudhary@qlogic.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.