All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shuah Khan <shuah.kh@samsung.com>
To: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: "len.brown@intel.com" <len.brown@intel.com>,
	"rafael.j.wysocki@intel.com" <rafael.j.wysocki@intel.com>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"shuahkhan@gmail.com" <shuahkhan@gmail.com>
Subject: Re: [PATCH v2] PM: Fix dev_pm_put_subsys_data() to not call kfree() while holding device power lock
Date: Mon, 6 May 2013 19:46:18 +0000	[thread overview]
Message-ID: <1367869578.2953.57.camel@lorien> (raw)
In-Reply-To: <20130506194119.GA15886@kroah.com>

On Mon, 2013-05-06 at 12:41 -0700, gregkh@linuxfoundation.org wrote:
> On Mon, May 06, 2013 at 07:04:53PM +0000, Shuah Khan wrote:
> > dev_pm_put_subsys_data() calls kfree() while holding device power lock, when
> > the reference count is 0. Fix it to call kfree() after releasing the lock.
> > 
> > Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
> > Reviewed-by: Pavel Machek <pavel@ucw.cz>
> > Reviewed-by: Rafael Wysocki <rafael.j.wysocki@intel.com>
> > ---
> >  drivers/base/power/common.c |    8 +++++---
> >  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> Is this causing a problem now, and it should go into 3.10 and earlier
> kernels (if so, which ones?), or can it just wait until 3.11 as it's
> just a cleanup fix?

It can wait until 3.11. At this point I don't have any evidence that
this is actually causing problems. So please treat this as a cleanup fix
found during code review.

thanks,
-- Shuah

-- 
Shuah Khan Lead Kernel Developer - Open Source Group 
Samsung Research America (Silicon Valley)
shuah.kh@samsung.com | (970) 672-0658

WARNING: multiple messages have this Message-ID (diff)
From: Shuah Khan <shuah.kh@samsung.com>
To: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: "len.brown@intel.com" <len.brown@intel.com>,
	"rafael.j.wysocki@intel.com" <rafael.j.wysocki@intel.com>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"shuahkhan@gmail.com" <shuahkhan@gmail.com>
Subject: Re: [PATCH v2] PM: Fix dev_pm_put_subsys_data() to not call kfree() while holding device power lock
Date: Mon, 6 May 2013 19:46:18 +0000	[thread overview]
Message-ID: <1367869578.2953.57.camel@lorien> (raw)
In-Reply-To: <20130506194119.GA15886@kroah.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1219 bytes --]

On Mon, 2013-05-06 at 12:41 -0700, gregkh@linuxfoundation.org wrote:
> On Mon, May 06, 2013 at 07:04:53PM +0000, Shuah Khan wrote:
> > dev_pm_put_subsys_data() calls kfree() while holding device power lock, when
> > the reference count is 0. Fix it to call kfree() after releasing the lock.
> > 
> > Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
> > Reviewed-by: Pavel Machek <pavel@ucw.cz>
> > Reviewed-by: Rafael Wysocki <rafael.j.wysocki@intel.com>
> > ---
> >  drivers/base/power/common.c |    8 +++++---
> >  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> Is this causing a problem now, and it should go into 3.10 and earlier
> kernels (if so, which ones?), or can it just wait until 3.11 as it's
> just a cleanup fix?

It can wait until 3.11. At this point I don't have any evidence that
this is actually causing problems. So please treat this as a cleanup fix
found during code review.

thanks,
-- Shuah

-- 
Shuah Khan Lead Kernel Developer - Open Source Group 
Samsung Research America (Silicon Valley)
shuah.kh@samsung.com | (970) 672-0658
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

  reply	other threads:[~2013-05-06 19:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-03 20:46 [PATCH] PM: Fix dev_pm_put_subsys_data() to not call kfree() while holding device power lock Shuah Khan
2013-05-03 20:46 ` Shuah Khan
2013-05-04 12:51 ` Pavel Machek
2013-05-06 12:07   ` Rafael J. Wysocki
2013-05-06 12:09     ` Pavel Machek
2013-05-06 14:01       ` Shuah Khan
2013-05-06 14:01         ` Shuah Khan
2013-05-06 19:10         ` Shuah Khan
2013-05-06 19:10           ` Shuah Khan
2013-05-06 19:04       ` [PATCH v2] " Shuah Khan
2013-05-06 19:04         ` Shuah Khan
2013-05-06 19:41         ` gregkh
2013-05-06 19:46           ` Shuah Khan [this message]
2013-05-06 19:46             ` Shuah Khan
2013-05-06 19:56           ` Rafael J. Wysocki
2013-05-06 20:33             ` gregkh

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=1367869578.2953.57.camel@lorien \
    --to=shuah.kh@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=shuahkhan@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.