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-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.58.0806251539180.405@gandalf.stny.rr.com>
Date:	Wed, 25 Jun 2008 15:46:37 -0400 (EDT)
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Oleg Nesterov <oleg@...sign.ru>
cc:	Thomas Gleixner <tglx@...utronix.de>,
	Arjan van de Ven <arjan@...ux.intel.com>,
	Heiko Carstens <heiko.carstens@...ibm.com>,
	Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: hrtimers: simplify lockdep handling


Hi Oleg,

I'm currently porting -rt to 26-rc7 and I came across this change:

Commit:     8e60e05fdc7344415fa69a3883b11f65db967b47

With the

-	double_spin_lock(&new_base->lock, &old_base->lock,
-			 smp_processor_id() < cpu);
+	spin_lock(&new_base->lock);
+	spin_lock_nested(&old_base->lock, SINGLE_DEPTH_NESTING);


What's the reason that this is possible?  Is it because the migration
happens only on CPU hotplugging and that the CPU hotplugging code has
locks that would prevent a reversal of the lock taking?

I'm not arguing that the code is incorrect, but this looks like a subtlety
that can bite us later.

In other words, we really need comments around this code to explain to
casual viewers why this code is not deadlock prone. The change log here
and for 0d180406f2914aea3a78ddb880e2fe9ac78a9372 does not explain why the
straight forward taking of the locks is OK.

Thanks,

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