Re: [PATCH] dmaengine: dw: fix potential memory leak in dw_dma_parse_dt()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> ---
> 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@xxxxxxxxxx>

-- 
viresh
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux