summaryrefslogtreecommitdiff
path: root/fs/dlm/ast.c
diff options
context:
space:
mode:
authorHou Tao <houtao1@huawei.com>2018-10-12 14:01:26 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-20 09:52:35 +0200
commit5ac147ebfa1c50cc0f25e3c7f42862cfe6b40d0d (patch)
tree69dd280acd72baa840867fe4edd8b3b2139f6844 /fs/dlm/ast.c
parentf37a3ff6e4c7cb93eb65c6fc6c549fafa2673863 (diff)
jffs2: return -ERANGE when xattr buffer is too small
When a file have multiple xattrs and the passed buffer is smaller than the required size, jffs2_listxattr() should return -ERANGE instead of continue, else Oops may occur due to memory corruption. Also remove the unnecessary check ("rc < 0"), because xhandle->list(...) will not return an error number. Spotted by generic/377 in xfstests-dev. NB: The problem had been fixed by commit 764a5c6b1fa4 ("xattr handlers: Simplify list operation") in v4.5-rc1, but the modification in that commit may be too much because it modifies all file-systems which implement xattr, so I create a single patch for jffs2 to fix the problem. Signed-off-by: Hou Tao <houtao1@huawei.com> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/dlm/ast.c')
0 files changed, 0 insertions, 0 deletions