lkml.org 
[lkml]   [2012]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] regulator: core: Move regulator release to avoid deadlock
On Monday 29 October 2012 09:44 PM, Mark Brown wrote:
> * PGP Signed by an unknown key
>
> On Mon, Oct 29, 2012 at 09:33:33AM +0000, Charles Keepax wrote:
>> regulator_put function was called whilst holding the
>> regulator_list_mutex, which is also locked from regulator_put. This
>> causes deadlock when failing to register a regulator.
> Applied, thanks.

This patch create the crash in following case:
- If there is of rail supply and supply does not found. In this case it
goes to scrub and rdev->supply at this point shows NULL but when call
the function device_unregister(&rdev->dev), the rdev->supply becomes
random pointer.

What happen if we do the device_unregister() outside the mutex lock?


\
 
 \ /
  Last update: 2012-10-31 12:41    [W:0.106 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site