X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=fs%2Fposix_acl.c;h=3542f1f814e2a966d33429f61e9f78ab5404a18c;hb=c73df6f73c8167b9ed68d653d1a5c761c209d2b5;hp=8bd2135b7f82ce181445f8e4804d4b226dca4891;hpb=f38787f4f921222d080d976ef59210ce3c6c6cb4;p=firefly-linux-kernel-4.4.55.git diff --git a/fs/posix_acl.c b/fs/posix_acl.c index 8bd2135b7f82..3542f1f814e2 100644 --- a/fs/posix_acl.c +++ b/fs/posix_acl.c @@ -158,6 +158,12 @@ posix_acl_equiv_mode(const struct posix_acl *acl, umode_t *mode_p) umode_t mode = 0; int not_equiv = 0; + /* + * A null ACL can always be presented as mode bits. + */ + if (!acl) + return 0; + FOREACH_ACL_ENTRY(pa, acl, pe) { switch (pa->e_tag) { case ACL_USER_OBJ: