]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.10.56/fs-notify-don-t-show-f_handle-if-exportfs_encode_inode_fh-failed.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.10.56 / fs-notify-don-t-show-f_handle-if-exportfs_encode_inode_fh-failed.patch
CommitLineData
9936a6f2
GKH
1From 7e8824816bda16bb11ff5ff1e1212d642e57b0b3 Mon Sep 17 00:00:00 2001
2From: Andrey Vagin <avagin@openvz.org>
3Date: Tue, 9 Sep 2014 14:51:06 -0700
4Subject: fs/notify: don't show f_handle if exportfs_encode_inode_fh failed
5
6From: Andrey Vagin <avagin@openvz.org>
7
8commit 7e8824816bda16bb11ff5ff1e1212d642e57b0b3 upstream.
9
10Currently we handle only ENOSPC. In case of other errors the file_handle
11variable isn't filled properly and we will show a part of stack.
12
13Signed-off-by: Andrey Vagin <avagin@openvz.org>
14Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
15Cc: Alexander Viro <viro@zeniv.linux.org.uk>
16Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
17Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
18Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19
20---
21 fs/notify/fdinfo.c | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24--- a/fs/notify/fdinfo.c
25+++ b/fs/notify/fdinfo.c
26@@ -50,7 +50,7 @@ static int show_mark_fhandle(struct seq_
27 size = f.handle.handle_bytes >> 2;
28
29 ret = exportfs_encode_inode_fh(inode, (struct fid *)f.handle.f_handle, &size, 0);
30- if ((ret == FILEID_INVALID) || (ret == -ENOSPC)) {
31+ if ((ret == FILEID_INVALID) || (ret < 0)) {
32 WARN_ONCE(1, "Can't encode file handler for inotify: %d\n", ret);
33 return 0;
34 }