diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2012-03-06 07:56:33 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-03-10 17:05:30 -0500 |
commit | 097b180ca09b581ef0dc24fbcfc1b227de3875df (patch) | |
tree | 880d5b5a0dfa28df3b4cec83bc557f2d47a459b0 /fs/namei.c | |
parent | f6940fe9092e796119af691c7f722c252f4fc524 (diff) |
vfs: fix double put after complete_walk()
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>
CC: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/namei.c b/fs/namei.c index e2ba62820a0f..f79aef16320b 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -2261,7 +2261,7 @@ static struct file *do_last(struct nameidata *nd, struct path *path, | |||
2261 | /* Why this, you ask? _Now_ we might have grown LOOKUP_JUMPED... */ | 2261 | /* Why this, you ask? _Now_ we might have grown LOOKUP_JUMPED... */ |
2262 | error = complete_walk(nd); | 2262 | error = complete_walk(nd); |
2263 | if (error) | 2263 | if (error) |
2264 | goto exit; | 2264 | return ERR_PTR(error); |
2265 | error = -EISDIR; | 2265 | error = -EISDIR; |
2266 | if (S_ISDIR(nd->inode->i_mode)) | 2266 | if (S_ISDIR(nd->inode->i_mode)) |
2267 | goto exit; | 2267 | goto exit; |