public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
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>,
	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 11:00:08 +0530	[thread overview]
Message-ID: <20151218053008.GS1854@localhost> (raw)
In-Reply-To: <1450395058-23442-1-git-send-email-mans@mansr.com>

On Thu, Dec 17, 2015 at 11:30:57PM +0000, 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.

Applied, thanks

-- 
~Vinod

      parent reply	other threads:[~2015-12-18  5:26 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
2015-12-18  5:30 ` Vinod Koul [this message]

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=20151218053008.GS1854@localhost \
    --to=vinod.koul@intel.com \
    --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=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