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]
Message-ID: <20151218015900.GF28277@ubuntu>
Date:	Fri, 18 Dec 2015 07:29:00 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Mans Rullgard <mans@...sr.com>
Cc:	Viresh Kumar <vireshk@...nel.org>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Dan Williams <dan.j.williams@...el.com>,
	Vinod Koul <vinod.koul@...el.com>, dmaengine@...r.kernel.org,
	linux-kernel@...r.kernel.org, Julian Margetson <runaway@...dw.ms>
Subject: Re: [PATCH] dmaengine: dw: fix potential memory leak in
 dw_dma_parse_dt()

On 17-12-15, 23:30, Mans Rullgard wrote:
> If the "dma-channels" DT property is missing, the dw_dma_parse_dt()
> function return NULL, but not before allocating memory for a struct
> dw_dma_platform_data through devres.  If the device supports parameter
> detection, the probe still succeeds and the allocated memory is not
> released until the device is removed.
> 
> Fix this by deferring the allocation until after checking the
> "dma-channels" property.
> 
> Signed-off-by: Mans Rullgard <mans@...sr.com>
> ---
> This has only been compile-tested as I have no suitable hardware.
> ---
>  drivers/dma/dw/platform.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)

Acked-by: Viresh Kumar <viresh.kumar@...aro.org>

-- 
viresh
--
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