diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2012-03-06 13:56:34 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-19 08:57:44 -0700 |
commit | 9a2317b6ce52b4983699cbdd4634d3590f7cacaa (patch) | |
tree | 6a68c91bddc6cdd9d22474e2488490883a9b88b2 | |
parent | 60d3a450571b3d92f5f9f78f2898a7f425031b51 (diff) | |
download | kernel_samsung_espresso10-9a2317b6ce52b4983699cbdd4634d3590f7cacaa.zip kernel_samsung_espresso10-9a2317b6ce52b4983699cbdd4634d3590f7cacaa.tar.gz kernel_samsung_espresso10-9a2317b6ce52b4983699cbdd4634d3590f7cacaa.tar.bz2 |
vfs: fix return value from do_last()
commit 7f6c7e62fcc123e6bd9206da99a2163fe3facc31 upstream.
complete_walk() returns either ECHILD or ESTALE. do_last() turns this into
ECHILD unconditionally. If not in RCU mode, this error will reach userspace
which is complete nonsense.
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
@@ -2109,7 +2109,7 @@ static struct file *do_last(struct nameidata *nd, struct path *path, /* sayonara */ error = complete_walk(nd); if (error) - return ERR_PTR(-ECHILD); + return ERR_PTR(error); error = -ENOTDIR; if (nd->flags & LOOKUP_DIRECTORY) { |