summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2012-03-06 13:56:33 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-19 09:02:20 -0700
commit9ab2a6cf17c23e2cb54f98817fa2aa7ffb1456b8 (patch)
treed76573a3467f063c22f9311df89ba942b61ce95e /fs
parentebccbea3908a4c2d490fdd13d353f1b81be5e276 (diff)
vfs: fix double put after complete_walk()
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/namei.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/namei.c b/fs/namei.c
index b8344d0166cc..9680cef48bbc 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2238,7 +2238,7 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
/* 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;