Re: [PATCH v2] PM: Fix dev_pm_put_subsys_data() to not call kfree()while holding device power lock
From: Shuah Khan
Date: Mon May 06 2013 - 15:46:25 EST
On Mon, 2013-05-06 at 12:41 -0700, gregkh@xxxxxxxxxxxxxxxxxxx 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@xxxxxxxxxxx>
> > Reviewed-by: Pavel Machek <pavel@xxxxxx>
> > Reviewed-by: Rafael Wysocki <rafael.j.wysocki@xxxxxxxxx>
> > ---
> > 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@xxxxxxxxxxx | (970) 672-0658
N§²æìr¸yúèØb²X¬¶ÇvØ^)Þ{.nÇ+·¥{±êçzX§¶¡Ü}©²ÆzÚ&j:+v¨¾«êçzZ+Ê+zf£¢·h§~Ûiÿûàz¹®w¥¢¸?¨èÚ&¢)ßfù^jÇy§m
á@A«a¶Úÿ0¶ìh®åi