mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 12:16:29 -04:00
staging: lustre: fix handling lustre_posix_acl_xattr_filter result
The function can return negative value. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4346f9a01f
commit
92bb833e39
@@ -175,11 +175,12 @@ int ll_setxattr_common(struct inode *inode, const char *name,
|
||||
}
|
||||
ee_free(ee);
|
||||
} else if (rce->rce_ops == RMT_RSETFACL) {
|
||||
size = lustre_posix_acl_xattr_filter(
|
||||
rc = lustre_posix_acl_xattr_filter(
|
||||
(posix_acl_xattr_header *)value,
|
||||
size, &new_value);
|
||||
if (unlikely(size < 0))
|
||||
return size;
|
||||
if (unlikely(rc < 0))
|
||||
return rc;
|
||||
size = rc;
|
||||
|
||||
pv = (const char *)new_value;
|
||||
} else
|
||||
|
||||
Reference in New Issue
Block a user