Skip to content

Commit 097b180

Browse files
Miklos SzerediAl Viro
authored andcommitted
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>
1 parent f6940fe commit 097b180

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/namei.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2261,7 +2261,7 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
22612261
/* Why this, you ask? _Now_ we might have grown LOOKUP_JUMPED... */
22622262
error = complete_walk(nd);
22632263
if (error)
2264-
goto exit;
2264+
return ERR_PTR(error);
22652265
error = -EISDIR;
22662266
if (S_ISDIR(nd->inode->i_mode))
22672267
goto exit;

0 commit comments

Comments
 (0)