[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091215012322.GI6679@linux.vnet.ibm.com>
Date: Mon, 14 Dec 2009 17:23:22 -0800
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
LKML <linux-kernel@...r.kernel.org>,
Dipankar Sarma <dipankar@...ibm.com>,
Ingo Molnar <mingo@...e.hu>, Oleg Nesterov <oleg@...sign.ru>,
Al Viro <viro@...iv.linux.org.uk>,
James Morris <jmorris@...ei.org>,
David Howells <dhowells@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [patch 0/9] Fix various __task_cred related invalid RCU
assumptions
On Mon, Dec 14, 2009 at 03:30:39PM +0100, Peter Zijlstra wrote:
> On Mon, 2009-12-14 at 06:16 -0800, Paul E. McKenney wrote:
>
> > > I think you can use lock_is_held(&rcu_lock_map), except you need to deal
> > > with the !debug_locks case, because lockdep stops once debug_locks
> > > becomes false, which means lock_is_held() will return rubbish.
> >
> > OK, so I need to do something like the following, then?
> >
> > debug_locks ? lock_is_held(&rcu_lock_map) : 1
>
> Depending on what the safe return value is, yeah. If you want an assert
> like function, false is usually the safe one.
>
> #define lockdep_assert_held(l) WARN_ON(debug_locks && !lockdep_is_held(l))
>
> is the one in-tree user of this.
Sounds good, thank you for the tip!!!
Thanx, Paul
--
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