lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 31 Oct 2012 12:01:17 +0000
From:	Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>
To:	Laxman Dewangan <ldewangan@...dia.com>
Cc:	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	"lrg@...com" <lrg@...com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"patches@...nsource.wolfsonmicro.com" 
	<patches@...nsource.wolfsonmicro.com>
Subject: Re: [PATCH] regulator: core: Move regulator release to avoid
	deadlock

On Wed, Oct 31, 2012 at 04:03:59PM +0530, Laxman Dewangan wrote:
> 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.

Yeah that is a problem, sorry for missing this.

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

It would look reasonable to me, but I think it is going to make
more sense for someone with more experience than myself to have a
closer look at what can be done.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists