diff options
| author | Miklos Szeredi <miklos@szeredi.hu> | 2015-11-10 11:08:41 -0500 |
|---|---|---|
| committer | Miklos Szeredi <miklos@szeredi.hu> | 2015-11-10 11:08:41 -0500 |
| commit | 97daf8b97ad6f913a34c82515be64dc9ac08d63e (patch) | |
| tree | 5ab438b8e383f9fe8b6f0737046852bd333050d5 | |
| parent | 8d3095f4ad47ac409440a0ba1c80e13519ff867d (diff) | |
ovl: allow zero size xattr
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>
| -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 871fcb67be97..394e87f8340f 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) | |||
| 54 | 54 | ||
| 55 | for (name = buf; name < (buf + list_size); name += strlen(name) + 1) { | 55 | for (name = buf; name < (buf + list_size); name += strlen(name) + 1) { |
| 56 | size = vfs_getxattr(old, name, value, XATTR_SIZE_MAX); | 56 | size = vfs_getxattr(old, name, value, XATTR_SIZE_MAX); |
| 57 | if (size <= 0) { | 57 | if (size < 0) { |
| 58 | error = size; | 58 | error = size; |
| 59 | goto out_free_value; | 59 | goto out_free_value; |
| 60 | } | 60 | } |
