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:
parent
4346f9a01f
commit
92bb833e39
1 changed files with 4 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue