This is a note to let you know that I've just added the patch titled fuse: fix memory leak in fuse_create_open to the 6.1-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: fuse-fix-memory-leak-in-fuse_create_open.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit a84b7dea9c08ad2f60802e7b8618a354d227351b Author: yangyun <yangyun50@xxxxxxxxxx> Date: Fri Aug 23 16:51:46 2024 +0800 fuse: fix memory leak in fuse_create_open [ Upstream commit 3002240d16494d798add0575e8ba1f284258ab34 ] The memory of struct fuse_file is allocated but not freed when get_create_ext return error. Fixes: 3e2b6fdbdc9a ("fuse: send security context of inode on file") Cc: stable@xxxxxxxxxxxxxxx # v5.17 Signed-off-by: yangyun <yangyun50@xxxxxxxxxx> Signed-off-by: Miklos Szeredi <mszeredi@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 3b7887312ac0..aa2be4c1ea8f 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -618,7 +618,7 @@ static int fuse_create_open(struct inode *dir, struct dentry *entry, err = get_create_ext(&args, entry, mode); if (err) - goto out_put_forget_req; + goto out_free_ff; err = fuse_simple_request(fm, &args); free_ext_value(&args);