public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Javi Merino <javi.merino@arm.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "edubezval@gmail.com" <edubezval@gmail.com>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Zhang Rui <rui.zhang@intel.com>
Subject: Re: [PATCH] thermal: power_allocator: allocate with kcalloc what you free with kfree
Date: Sat, 29 Aug 2015 13:27:46 +0100	[thread overview]
Message-ID: <20150829122737.GA2840@e104805> (raw)
In-Reply-To: <20150827154936.GH5653@e104805>

Hi Linus,

On Thu, Aug 27, 2015 at 04:49:37PM +0100, Javi Merino wrote:
> On Tue, Aug 25, 2015 at 07:22:35PM +0100, Javi Merino wrote:
> > Commit cf736ea6f902 ("thermal: power_allocator: do not use devm*
> > interfaces") forgot to change a devm_kcalloc() to just kcalloc(), but
> > it's corresponding devm_kfree() was changed to kfree().  Allocate with
> > kcalloc() to match the kfree().
> > 
> > Fixes: cf736ea6f902 ("thermal: power_allocator: do not use devm* interfaces")
> > Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > Cc: Eduardo Valentin <edubezval@gmail.com>
> > Cc: Zhang Rui <rui.zhang@intel.com>
> > Signed-off-by: Javi Merino <javi.merino@arm.com>
> > ---
> > 
> > Can this be merged for 4.2, please?  I'm having memory problems with
> > 4.2-rc8 because of this.
> 
> Please merge this for 4.2 or revert cf736ea6f902 ("thermal:
> power_allocator: do not use devm* interfaces")

cf736ea6f902 ("thermal: power_allocator: do not use devm*
interfaces") was merged for 4.2-rc8.  It leaves an allocation of
memory with devm_kcalloc() that is then freed with kfree().  The
patch at the top of the thread[0][1] fixes this.  Can you either
merge this patch or revert cf736ea6f902 for 4.2?

[0] https://patchwork.kernel.org/patch/7072591/
[1] Message-ID: <1440526955-9860-1-git-send-email-javi.merino@arm.com>

Thanks,
Javi

  reply	other threads:[~2015-08-29 12:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-25 18:22 [PATCH] thermal: power_allocator: allocate with kcalloc what you free with kfree Javi Merino
2015-08-27 15:49 ` Javi Merino
2015-08-29 12:27   ` Javi Merino [this message]
2015-08-29 17:55     ` Linus Torvalds

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=20150829122737.GA2840@e104805 \
    --to=javi.merino@arm.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=edubezval@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=torvalds@linux-foundation.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