From: Viresh Kumar <viresh.kumar@linaro.org>
To: Mans Rullgard <mans@mansr.com>
Cc: Viresh Kumar <vireshk@kernel.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Dan Williams <dan.j.williams@intel.com>,
Vinod Koul <vinod.koul@intel.com>,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
Julian Margetson <runaway@candw.ms>
Subject: Re: [PATCH] dmaengine: dw: fix potential memory leak in dw_dma_parse_dt()
Date: Fri, 18 Dec 2015 07:29:00 +0530 [thread overview]
Message-ID: <20151218015900.GF28277@ubuntu> (raw)
In-Reply-To: <1450395058-23442-1-git-send-email-mans@mansr.com>
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@mansr.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@linaro.org>
--
viresh
next prev parent reply other threads:[~2015-12-18 1:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-17 23:30 [PATCH] dmaengine: dw: fix potential memory leak in dw_dma_parse_dt() Mans Rullgard
2015-12-18 1:59 ` Viresh Kumar [this message]
2015-12-18 5:30 ` 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=20151218015900.GF28277@ubuntu \
--to=viresh.kumar@linaro.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mans@mansr.com \
--cc=runaway@candw.ms \
--cc=vinod.koul@intel.com \
--cc=vireshk@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox