Patch "nfs: fix acl memory leak of posix_acl_create()" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    nfs: fix acl memory leak of posix_acl_create()

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     nfs-fix-acl-memory-leak-of-posix_acl_create.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 0074844d2fed82d87fa557354b4a53a7b7f02b36
Author: Gao Xiang <hsiangkao@xxxxxxxxxxxxxxxxx>
Date:   Fri Jun 18 12:20:55 2021 +0800

    nfs: fix acl memory leak of posix_acl_create()
    
    [ Upstream commit 1fcb6fcd74a222d9ead54d405842fc763bb86262 ]
    
    When looking into another nfs xfstests report, I found acl and
    default_acl in nfs3_proc_create() and nfs3_proc_mknod() error
    paths are possibly leaked. Fix them in advance.
    
    Fixes: 013cdf1088d7 ("nfs: use generic posix ACL infrastructure for v3 Posix ACLs")
    Cc: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>
    Cc: Anna Schumaker <anna.schumaker@xxxxxxxxxx>
    Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>
    Cc: Joseph Qi <joseph.qi@xxxxxxxxxxxxxxxxx>
    Signed-off-by: Gao Xiang <hsiangkao@xxxxxxxxxxxxxxxxx>
    Signed-off-by: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c
index 9eb2f1a503ab..01a03ca36659 100644
--- a/fs/nfs/nfs3proc.c
+++ b/fs/nfs/nfs3proc.c
@@ -350,7 +350,7 @@ nfs3_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
 				break;
 
 			case NFS3_CREATE_UNCHECKED:
-				goto out;
+				goto out_release_acls;
 		}
 		nfs_fattr_init(data->res.dir_attr);
 		nfs_fattr_init(data->res.fattr);
@@ -717,7 +717,7 @@ nfs3_proc_mknod(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
 		break;
 	default:
 		status = -EINVAL;
-		goto out;
+		goto out_release_acls;
 	}
 
 	d_alias = nfs3_do_create(dir, dentry, data);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux