Skip to content

Commit

Permalink
GFS2: Fix crash during ACL deletion in acl max entry check in gfs2_se…
Browse files Browse the repository at this point in the history
…t_acl()

Fixes: e01580b ("gfs2: use generic posix ACL infrastructure")
Reported-by: Eric Meddaugh <etmsys@rit.edu>
Tested-by: Eric Meddaugh <etmsys@rit.edu>
Signed-off-by: Andrew Elble <aweits@rit.edu>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
  • Loading branch information
Andrew Elble authored and Steven Whitehouse committed Feb 10, 2015
1 parent 7456a37 commit 2787020
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/gfs2/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 2787020

Please sign in to comment.