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]
Message-ID: <20141214192931.GB6372@redhat.com>
Date:	Sun, 14 Dec 2014 20:29:31 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	David Hildenbrand <dahi@...ux.vnet.ibm.com>
Cc:	linux-kernel@...r.kernel.org, heiko.carstens@...ibm.com,
	borntraeger@...ibm.com, rafael.j.wysocki@...el.com,
	paulmck@...ux.vnet.ibm.com, peterz@...radead.org, bp@...e.de,
	jkosina@...e.cz
Subject: Re: [PATCH v5] CPU hotplug: active_writer not woken up in some
	cases - deadlock

On 12/12, David Hildenbrand wrote:
>
>  void get_online_cpus(void)
>  {
> @@ -103,8 +95,7 @@ void get_online_cpus(void)
>  		return;
>  	cpuhp_lock_acquire_read();
>  	mutex_lock(&cpu_hotplug.lock);
> -	apply_puts_pending(65536);
> -	cpu_hotplug.refcount++;
> +	atomic_inc(&cpu_hotplug.refcount);
>  	mutex_unlock(&cpu_hotplug.lock);

I think the patch is fine.

I am wondering if it makes sense to add

	if (atomic_inc_not_zero(&cpu_hotplug.refcount))
		return;

before mutex_lock(). But even if I am right we can do this later.

Oleg.

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ