All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Dan Williams <dan.j.williams@intel.com>,
	dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch] dmaengine: edma: double free on error in edma_prep_slave_sg()
Date: Wed, 13 Nov 2013 10:31:36 +0000	[thread overview]
Message-ID: <20131113101936.GW8834@intel.com> (raw)
In-Reply-To: <20131113074446.GC25541@elgon.mountain>

On Wed, Nov 13, 2013 at 10:44:46AM +0300, Dan Carpenter wrote:
> We accidentally applied two correct but duplicative fixes for a memory
> leak here:
> 4b6271a64463 ('dma: edma: Fix memory leak')
> 2f6d8fad0a16 ('dma: edma.c: remove edma_desc leakage')
Thanks Dan,

I already send the same fix today morning. This was reported by Wing-Keung
sometime back

--
~Vinod
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
> index ea4abaa..9c8103d 100644
> --- a/drivers/dma/edma.c
> +++ b/drivers/dma/edma.c
> @@ -420,7 +420,6 @@ static struct dma_async_tx_descriptor *edma_prep_slave_sg(
>  				edma_alloc_slot(EDMA_CTLR(echan->ch_num),
>  						EDMA_SLOT_ANY);
>  			if (echan->slot[i] < 0) {
> -				kfree(edesc);
>  				dev_err(dev, "Failed to allocate slot\n");
>  				kfree(edesc);
>  				return NULL;
> --
> To unsubscribe from this list: send the line "unsubscribe dmaengine" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 

WARNING: multiple messages have this Message-ID (diff)
From: Vinod Koul <vinod.koul@intel.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Dan Williams <dan.j.williams@intel.com>,
	dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch] dmaengine: edma: double free on error in edma_prep_slave_sg()
Date: Wed, 13 Nov 2013 15:49:36 +0530	[thread overview]
Message-ID: <20131113101936.GW8834@intel.com> (raw)
In-Reply-To: <20131113074446.GC25541@elgon.mountain>

On Wed, Nov 13, 2013 at 10:44:46AM +0300, Dan Carpenter wrote:
> We accidentally applied two correct but duplicative fixes for a memory
> leak here:
> 4b6271a64463 ('dma: edma: Fix memory leak')
> 2f6d8fad0a16 ('dma: edma.c: remove edma_desc leakage')
Thanks Dan,

I already send the same fix today morning. This was reported by Wing-Keung
sometime back

--
~Vinod
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
> index ea4abaa..9c8103d 100644
> --- a/drivers/dma/edma.c
> +++ b/drivers/dma/edma.c
> @@ -420,7 +420,6 @@ static struct dma_async_tx_descriptor *edma_prep_slave_sg(
>  				edma_alloc_slot(EDMA_CTLR(echan->ch_num),
>  						EDMA_SLOT_ANY);
>  			if (echan->slot[i] < 0) {
> -				kfree(edesc);
>  				dev_err(dev, "Failed to allocate slot\n");
>  				kfree(edesc);
>  				return NULL;
> --
> To unsubscribe from this list: send the line "unsubscribe dmaengine" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 

  reply	other threads:[~2013-11-13 10:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-13  7:44 [patch] dmaengine: edma: double free on error in edma_prep_slave_sg() Dan Carpenter
2013-11-13  7:44 ` Dan Carpenter
2013-11-13 10:19 ` Vinod Koul [this message]
2013-11-13 10:31   ` Vinod Koul

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=20131113101936.GW8834@intel.com \
    --to=vinod.koul@intel.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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.