The patch below does not apply to the 6.1-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to stable@vger.kernel.org.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y git checkout FETCH_HEAD git cherry-pick -x 3002240d16494d798add0575e8ba1f284258ab34 # <resolve conflicts, build, test, etc.> git commit -s git send-email --to 'stable@vger.kernel.org' --in-reply-to '2024090804-leverage-floral-9b6b@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
3002240d1649 ("fuse: fix memory leak in fuse_create_open") 15d937d7ca8c ("fuse: add request extension") 153524053bbb ("fuse: allow non-extending parallel direct writes on the same file") 4f8d37020e1f ("fuse: add "expire only" mode to FUSE_NOTIFY_INVAL_ENTRY")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 3002240d16494d798add0575e8ba1f284258ab34 Mon Sep 17 00:00:00 2001 From: yangyun yangyun50@huawei.com Date: Fri, 23 Aug 2024 16:51:46 +0800 Subject: [PATCH] fuse: fix memory leak in fuse_create_open
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@vger.kernel.org # v5.17 Signed-off-by: yangyun yangyun50@huawei.com Signed-off-by: Miklos Szeredi mszeredi@redhat.com
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 2b0d4781f394..8e96df9fd76c 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -670,7 +670,7 @@ static int fuse_create_open(struct inode *dir, struct dentry *entry,
err = get_create_ext(&args, dir, entry, mode); if (err) - goto out_put_forget_req; + goto out_free_ff;
err = fuse_simple_request(fm, &args); free_ext_value(&args);
linux-stable-mirror@lists.linaro.org