lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 30 Mar 2015 23:19:10 +0530
From:	Vinod Koul <vinod.koul@...el.com>
To:	Peter Ujfalusi <peter.ujfalusi@...com>
Cc:	linux@....linux.org.uk, dan.j.williams@...el.com,
	dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	Jonas Jensen <jonas.jensen@...il.com>
Subject: Re: [PATCH 5/5] dmaengine: moxart-dma: Fix memory leak when stopping
 a running transfer

On Fri, Mar 27, 2015 at 01:35:55PM +0200, Peter Ujfalusi wrote:
> The vd->node is removed from the lists when the transfer started so the
> vchan_get_all_descriptors() will not find it. This results memory leak.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@...com>
> CC: Jonas Jensen <jonas.jensen@...il.com>
Applied, thanks

-- 
~Vinod

> ---
>  drivers/dma/moxart-dma.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/moxart-dma.c b/drivers/dma/moxart-dma.c
> index 15cab7d79525..b4634109e010 100644
> --- a/drivers/dma/moxart-dma.c
> +++ b/drivers/dma/moxart-dma.c
> @@ -193,8 +193,10 @@ static int moxart_terminate_all(struct dma_chan *chan)
>  
>  	spin_lock_irqsave(&ch->vc.lock, flags);
>  
> -	if (ch->desc)
> +	if (ch->desc) {
> +		moxart_dma_desc_free(&ch->desc->vd);
>  		ch->desc = NULL;
> +	}
>  
>  	ctrl = readl(ch->base + REG_OFF_CTRL);
>  	ctrl &= ~(APB_DMA_ENABLE | APB_DMA_FIN_INT_EN | APB_DMA_ERR_INT_EN);
> -- 
> 2.3.3
> 

-- 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ