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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 8 Jan 2015 18:15:56 +0000
From:	Mark Brown <broonie@...nel.org>
To:	Ashay Jaiswal <ashayj@...eaurora.org>
Cc:	Liam Girdwood <lgirdwood@...il.com>, linux-kernel@...r.kernel.org,
	linux-arm-msm@...r.kernel.org,
	Anirudh Ghayal <aghayal@...eaurora.org>,
	David Collins <collinsd@...eaurora.org>
Subject: Re: [PATCH v2] regulator: core: fix race condition in regulator_put()

On Thu, Jan 08, 2015 at 06:54:25PM +0530, Ashay Jaiswal wrote:
> The regulator framework maintains a list of consumer regulators
> for a regulator device and protects it from concurrent access using
> the regulator device's mutex lock.

Applied, thanks but...

> +	mutex_lock(&rdev->mutex);
>  	kfree(regulator->supply_name);
>  	list_del(&regulator->list);
>  	kfree(regulator);
> 
>  	rdev->open_count--;
>  	rdev->exclusive = 0;
> +	mutex_unlock(&rdev->mutex);

I'll do a followup which moves the frees out of the locked region
(reordering things a bit) - they're the main bit I was worried about
with time, they should be fast since they're just frees but it's easy
enough to avoid having to think about it.

Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ