[ovs-dev] [PATCH 08/12] datapath: Convert rcu_dereference() to correct variant.

Jesse Gross jesse at nicira.com
Mon Dec 13 21:43:26 UTC 2010


On Mon, Dec 13, 2010 at 10:57 AM, Ben Pfaff <blp at nicira.com> wrote:
> On Sun, Dec 12, 2010 at 12:53:03PM -0800, Jesse Gross wrote:
>> Using rcu_dereference() makes lockdep complain if rcu_read_lock
>> is not held.  This is OK if the update side lock is held.  This
>> adds checks to see if RTNL lock is held, if that is also a
>> correct form of protection.
>>
>> Signed-off-by: Jesse Gross <jesse at nicira.com>
>
> The change in assign_config_rcu() doesn't match the others: it changes
> rcu_dereference() to rtnl_dereference(), not to rcu_dereference_rtnl().
> If you correct or clarify that one way or another, then:

The usage is correct, since we expect that RTNL will always be held at
that point.  I updated the commit message to try to clarify that.




More information about the dev mailing list