lkml.org 
[lkml]   [2013]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH v7 1/4] spinlock: A new lockref structure for lockless update of refcount
    From
    On Fri, Aug 30, 2013 at 1:54 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
    >
    > Not really. Sure, you'll retry it if you race with d_move(); that's not
    > the real problem - access past the end of the object containing ->d_name.name
    > would screw you and that's what ->d_lock is preventing there. Delayed freeing
    > of what ->d_name is pointing into is fine, but it's not the only way to get
    > hurt there...

    Umm? We follow d->d_name.name without d_lock under RCU all the time -
    that's what the pathname lookup is all about, after all.

    Yes, yes, you haev to be careful and cannot just blindly trust the
    length: you also have to check for NUL character as you are copying it
    and stop if you hit it. But that's trivial.

    Why would d_prepend be any different?

    Linus


    \
     
     \ /
      Last update: 2013-08-30 23:21    [W:3.082 / U:0.088 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site