Commit 9e2feaeb authored by Andrew Elble's avatar Andrew Elble Committed by Luis Henriques

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 avatarLuis Henriques <luis.henriques@canonical.com>
parent 3a87ac14
......@@ -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