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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 5 Oct 2010 14:09:04 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Ingo Molnar <mingo@...e.hu>, Eric Dumazet <eric.dumazet@...il.com>,
	linux-kernel@...r.kernel.org,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [GIT PULL] core kernel fixes

On Tue, Oct 05, 2010 at 01:15:02PM -0700, Linus Torvalds wrote:
> On Tue, Oct 5, 2010 at 12:12 PM, Ingo Molnar <mingo@...e.hu> wrote:
> >  #define rcu_dereference_bh(p) \
> > -               rcu_dereference_check(p, rcu_read_lock_bh_held())
> > +               rcu_dereference_check(p, rcu_read_lock_bh_held() || irqs_disabled())
> 
> Wouldn't that irqs_disabled() check have made more sense inside
> rcu_read_lock_bh_held()?
> 
> That's the function that is _supposed_ to check whether bottom halves
> are disabled, no? So why add a workaround for that function being
> buggy/incomplete in one place that uses it?

Good point!!!  If the following diff looks good to you, I will get it
tested and pushed.

							Thanx, Paul

------------------------------------------------------------------------

diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c
index 4d16983..0af1dc7 100644
--- a/kernel/rcupdate.c
+++ b/kernel/rcupdate.c
@@ -86,7 +86,7 @@ int rcu_read_lock_bh_held(void)
 {
 	if (!debug_lockdep_rcu_enabled())
 		return 1;
-	return in_softirq();
+	return in_softirq() || irqs_disabled();
 }
 EXPORT_SYMBOL_GPL(rcu_read_lock_bh_held);
 
--
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