Re: suspicious RCU usage in security/selinux/netnode.c
From: Paul Moore
Date: Tue May 15 2012 - 14:35:41 EST
On Tue, May 15, 2012 at 11:37 AM, Paul E. McKenney
<paulmck@xxxxxxxxxxxxxxxxxx> wrote:
> Here you go:
>
> o rcu_dereference_check() is for code shared between readers and
> writers, so that it might be protected by either rcu_read_lock()
> or some lock.
>
> o rcu_dereference_protected() is for code that is only used by
> updaters and never by readers. So rcu_dereference_protected()
> is (slightly) lighter weight than rcu_dereference_check()
> because it does not need to protect against concurrent
> updates.
Perfect, thank you. Looks like rcu_dereference_protected() is the
right choice here. Patch coming tomorrow if not later today.
--
paul moore
www.paul-moore.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/