diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2018-11-26 20:45:35 +0300 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2018-12-11 23:44:29 +0300 |
commit | 6ff9b09e00a441599f3aacdf577254455a048bc9 (patch) | |
tree | ae5ebad26e35f1445b1295b224d962831124769a /fs/gfs2/rgrp.h | |
parent | cbbe76c8bb27c0bea4bfa6cac56b5d4073b90687 (diff) | |
download | linux-6ff9b09e00a441599f3aacdf577254455a048bc9.tar.xz |
gfs2: Get rid of potential double-freeing in gfs2_create_inode
In gfs2_create_inode, after setting and releasing the acl / default_acl, the
acl / default_acl pointers are not set to NULL as they should be. In that
state, when the function reaches label fail_free_acls, gfs2_create_inode will
try to release the same acls again.
Fix that by setting the pointers to NULL after releasing the acls. Slightly
simplify the logic. Also, posix_acl_release checks for NULL already, so
there is no need to duplicate those checks here.
Fixes: e01580bf9e4d ("gfs2: use generic posix ACL infrastructure")
Reported-by: Pan Bian <bianpan2016@163.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org # v4.9+
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'fs/gfs2/rgrp.h')
0 files changed, 0 insertions, 0 deletions