NFSv3: Fix posix ACL code
Fix a memory leak due to allocation in the XDR layer. In cases where the RPC call needs to be retransmitted, we end up allocating new pages without clearing the old ones. Fix this by moving the allocation into nfs3_proc_setacls(). Also fix an issue discovered by Kevin Rudd, whereby the amount of memory reserved for the acls in the xdr_buf->head was miscalculated, and causing corruption. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
@@ -37,6 +37,9 @@
|
||||
#define NFSACL_MAXPAGES ((2*(8+12*NFS_ACL_MAX_ENTRIES) + PAGE_SIZE-1) \
|
||||
>> PAGE_SHIFT)
|
||||
|
||||
#define NFS_ACL_MAX_ENTRIES_INLINE (5)
|
||||
#define NFS_ACL_INLINE_BUFSIZE ((2*(2+3*NFS_ACL_MAX_ENTRIES_INLINE)) << 2)
|
||||
|
||||
static inline unsigned int
|
||||
nfsacl_size(struct posix_acl *acl_access, struct posix_acl *acl_default)
|
||||
{
|
||||
|
Reference in New Issue
Block a user