lkml.org 
[lkml]   [2012]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[ 11/38] vfs: fix double put after complete_walk()
    3.0-stable review patch.  If anyone has any objections, please let me know.

    ------------------
    From: Miklos Szeredi <mszeredi@suse.cz>

    commit 097b180ca09b581ef0dc24fbcfc1b227de3875df upstream.

    complete_walk() already puts nd->path, no need to do it again at cleanup time.

    This would result in Oopses if triggered, apparently the codepath is not too
    well exercised.

    Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    fs/namei.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)
    --- a/fs/namei.c
    +++ b/fs/namei.c
    @@ -2208,7 +2208,7 @@ static struct file *do_last(struct namei
    /* Why this, you ask? _Now_ we might have grown LOOKUP_JUMPED... */
    error = complete_walk(nd);
    if (error)
    - goto exit;
    + return ERR_PTR(error);
    error = -EISDIR;
    if (S_ISDIR(nd->inode->i_mode))
    goto exit;



    \
     
     \ /
      Last update: 2012-03-17 01:01    [from the cache]
    ©2003-2011 Jasper Spaans