diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2015-11-10 17:08:41 +0100 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2016-02-02 13:53:05 -0500 |
commit | 17b85e5e688f28172157921203824192cb2310bd (patch) | |
tree | 5122f9c172e6e8958f76fee59492a8c3fa94b5bb /fs | |
parent | 707e840c5e24bb2df1ea4e753964275e257ec816 (diff) | |
download | lwn-17b85e5e688f28172157921203824192cb2310bd.tar.gz lwn-17b85e5e688f28172157921203824192cb2310bd.zip |
ovl: allow zero size xattr
[ Upstream commit 97daf8b97ad6f913a34c82515be64dc9ac08d63e ]
When ovl_copy_xattr() encountered a zero size xattr no more xattrs were
copied and the function returned success. This is clearly not the desired
behavior.
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Cc: <stable@vger.kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/overlayfs/copy_up.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c index ea10a8719107..21b5d40724a1 100644 --- a/fs/overlayfs/copy_up.c +++ b/fs/overlayfs/copy_up.c @@ -54,7 +54,7 @@ int ovl_copy_xattr(struct dentry *old, struct dentry *new) for (name = buf; name < (buf + list_size); name += strlen(name) + 1) { size = vfs_getxattr(old, name, value, XATTR_SIZE_MAX); - if (size <= 0) { + if (size < 0) { error = size; goto out_free_value; } |