Skip to content

Commit

Permalink
[fs/9p] Plug potential acl leak
Browse files Browse the repository at this point in the history
In v9fs_get_acl() if __v9fs_get_acl() gets only one of the
dacl/pacl we are not releasing it.

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
  • Loading branch information
Venkateswararao Jujjuri (JV) authored and Eric Van Hensbergen committed Mar 15, 2011
1 parent 521cb40 commit c61fa0d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions fs/9p/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,15 @@ int v9fs_get_acl(struct inode *inode, struct p9_fid *fid)
if (!IS_ERR(dacl) && !IS_ERR(pacl)) {
set_cached_acl(inode, ACL_TYPE_DEFAULT, dacl);
set_cached_acl(inode, ACL_TYPE_ACCESS, pacl);
posix_acl_release(dacl);
posix_acl_release(pacl);
} else
retval = -EIO;

if (!IS_ERR(dacl))
posix_acl_release(dacl);

if (!IS_ERR(pacl))
posix_acl_release(pacl);

return retval;
}

Expand Down

0 comments on commit c61fa0d

Please sign in to comment.