1
0
Fork 0

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>
steinar/wifi_calib_4_9_kernel
Miklos Szeredi 2015-11-10 17:08:41 +01:00
parent 8d3095f4ad
commit 97daf8b97a
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}