lkml.org 
[lkml]   [2020]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [PATCH RFC 0/1] mount: universally disallow mounting over symlinks
    On Mon, Jan 13, 2020 at 02:03:00PM +0800, Ian Kent wrote:

    > Oh wait, for systemd I was actually looking at:
    > https://github.com/systemd/systemd/blob/master/src/shared/switch-root.c
    >
    > >
    > > Mind you, that's not the actual systemd repo. either I probably
    > > need to look a lot deeper (and at the actual systemd repo) to
    > > work out what's actually being called.
    > >
    > > > Sigh... Guess I'll have to dig that Fedora KVM image out and
    > > > try to see what it's about... ;-/ Here comes a couple of hours
    > > > of build...

    D'oh... And yes, that would've been a bisect hazard - switch to
    path_lookupat() later in the series gets rid of that. Incremental
    (to be foldede, of course):

    diff --git a/fs/namei.c b/fs/namei.c
    index 1793661c3342..204677c37751 100644
    --- a/fs/namei.c
    +++ b/fs/namei.c
    @@ -2634,7 +2634,7 @@ path_mountpoint(struct nameidata *nd, unsigned flags, struct path *path)
    (err = lookup_last(nd)) > 0) {
    s = trailing_symlink(nd);
    }
    - if (!err)
    + if (!err && (nd->flags & LOOKUP_RCU))
    err = unlazy_walk(nd);
    if (!err)
    err = handle_lookup_down(nd);
    \
     
     \ /
      Last update: 2020-01-13 14:31    [W:4.150 / U:0.632 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site