[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1362680324.15793.219.camel@edumazet-glaptop>
Date: Thu, 07 Mar 2013 10:18:44 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Sasha Levin <sasha.levin@...cle.com>
Cc: ebiederm@...ssion.com,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Li Zefan <lizefan@...wei.com>, CAI Qian <caiqian@...hat.com>,
linux-kernel <linux-kernel@...r.kernel.org>,
Containers <containers@...ts.linux-foundation.org>
Subject: Re: 3.9-rc1 NULL pointer crash at find_pid_ns
On Thu, 2013-03-07 at 13:14 -0500, Sasha Levin wrote:
> Okay, I'm even more confused now.
>
> The expression in question is:
>
> hlist_entry_safe(rcu_dereference_bh(hlist_first_rcu(head)))
>
> You're saying that "rcu_dereference_bh(hlist_first_rcu(head))" can change between
> the two evaluations we do. That would mean that 'head' has changed in between, right?
>
> In that case, the list itself has changed - which means that RCU has changed the
> list underneath us.
>
> hlist_first_rcu() doesn't have any side-effects, it doesn't modify the list whatsoever,
> so the only thing that can change is 'head'. Why is it allowed to change if the list
> is protected by RCU?
Thats the point of RCU ;)
Things can change under us.
--
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