mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
vfs: fix double put after complete_walk()
commit 097b180ca0 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>
This commit is contained in:
parent
9a2317b6ce
commit
8b5cfa43c4
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user