diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2012-03-06 13:56:33 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-19 08:57:44 -0700 |
commit | 8b5cfa43c4e9e9042c77a4683d1b747329dbb2cf (patch) | |
tree | e3f78ace24c4e96dc0846613ff1f194314f0e346 | |
parent | 9a2317b6ce52b4983699cbdd4634d3590f7cacaa (diff) | |
download | kernel_samsung_tuna-8b5cfa43c4e9e9042c77a4683d1b747329dbb2cf.zip kernel_samsung_tuna-8b5cfa43c4e9e9042c77a4683d1b747329dbb2cf.tar.gz kernel_samsung_tuna-8b5cfa43c4e9e9042c77a4683d1b747329dbb2cf.tar.bz2 |
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>
-rw-r--r-- | fs/namei.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2208,7 +2208,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; |