Commit 3449e406 authored by Andrew Elble's avatar Andrew Elble Committed by Greg Kroah-Hartman

GFS2: Fix crash during ACL deletion in acl max entry check in gfs2_set_acl()

commit 27870207 upstream.

Fixes: e01580bf ("gfs2: use generic posix ACL infrastructure")
Reported-by: default avatarEric Meddaugh <etmsys@rit.edu>
Tested-by: default avatarEric Meddaugh <etmsys@rit.edu>
Signed-off-by: default avatarAndrew Elble <aweits@rit.edu>
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2ac80c2f
......@@ -73,7 +73,7 @@ int gfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
BUG_ON(name == NULL);
if (acl->a_count > GFS2_ACL_MAX_ENTRIES(GFS2_SB(inode)))
if (acl && acl->a_count > GFS2_ACL_MAX_ENTRIES(GFS2_SB(inode)))
return -E2BIG;
if (type == ACL_TYPE_ACCESS) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment