mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
ovl: allow zero size xattr
commit 97daf8b97a upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
acaf84251f
commit
85a7ed329a
@@ -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) {
|
for (name = buf; name < (buf + list_size); name += strlen(name) + 1) {
|
||||||
size = vfs_getxattr(old, name, value, XATTR_SIZE_MAX);
|
size = vfs_getxattr(old, name, value, XATTR_SIZE_MAX);
|
||||||
if (size <= 0) {
|
if (size < 0) {
|
||||||
error = size;
|
error = size;
|
||||||
goto out_free_value;
|
goto out_free_value;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user