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]
Message-Id: <1308249871.2682.461.camel@sbsiddha-MOBL3.sc.intel.com>
Date:	Thu, 16 Jun 2011 11:44:31 -0700
From:	Suresh Siddha <suresh.b.siddha@...el.com>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	Tejun Heo <tj@...nel.org>, "x86@...nel.org" <x86@...nel.org>,
	"mingo@...e.hu" <mingo@...e.hu>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"torvalds@...ux-foundation.org" <torvalds@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] stop_machine: kill __stop_machine()

On Thu, 2011-06-16 at 11:36 -0700, Peter Zijlstra wrote:
> On Thu, 2011-06-16 at 20:28 +0200, Tejun Heo wrote:
> > Peter, I don't think it's that simple.  get_online_cpus() itself can't
> > create circular dependency by itself.  It allows recursing.  The chain
> > involves cpu_hotplug_begin() which returns with hotplug mutex held.
> 
> 
> Right, its like:
> 
>  mutex_lock(&a);
>  get_online_cpus();
> 
> vs
> 
>  cpu_hotplug_begin()
>  mutex_lock(&a);
> 
> 
> that will really deadlock

Its actually like:

get_online_cpus();
mutex_lock(&a);
get_online_cpus(); <--- recursive get_online_cpus()

vs

cpu_hotplug_begin()
mutex_lock(&a);

So it can't cause deadlock in practice.

thanks,
suresh

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