lkml.org 
[lkml]   [2013]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] rculist: list_first_or_null_rcu() should use list_entry_rcu()
    On Wed, Jun 26, 2013 at 07:17:52AM -0700, Paul E. McKenney wrote:
    > > Do you mean something like the following?
    > >
    > > struct list_head *__next = ACCESS_ONCE(__ptr->next); \
    > > likely(__ptr != __next) ? \
    > > list_entry_rcu(__next, type, member) : NULL; \
    > >
    > > Yeah, that looks right to me.
    >
    > I would feel much better about this! Does it avoid warnings in your
    > use cases?

    Yeah, it does, and more importantly it adds the missing read barrier
    during RCU deref. I'll give it another test and post the updated
    version.

    Thanks a lot!

    --
    tejun


    \
     
     \ /
      Last update: 2013-06-26 23:41    [W:3.107 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site