Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f4289400 authored by Christopher J. Morrone's avatar Christopher J. Morrone Committed by Greg Kroah-Hartman
Browse files

staging/lustre/mdc: Handle empty but non-zero acl xattr



We have found that posix_acl_access can have a value
of \002\000\000\000.  In that case body->aclsize is
non-zero, but the there are no actuall acls stored
in the xattr.

In mdc_unpack_acl(), it only checks IS_ERR() on the
pointer returned by posix_acl_from_xattr(), it does not
check for NULL.  Because of the above situation, the
xattr aclsize can be non-zero, but posic_acl_from_xattr()
still returns NULL.  Passing NULL to posix_acl_valid()
crashes the kernel.

We add a check to properly handle the NULL return value.

Signed-off-by: default avatarChristopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/11989
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5150


Reviewed-by: default avatarFan Yong <fan.yong@intel.com>
Reviewed-by: default avatarBob Glossman <bob.glossman@intel.com>
Signed-off-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c61ac979
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment