]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.12-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 19 Oct 2025 12:12:20 +0000 (14:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 19 Oct 2025 12:12:20 +0000 (14:12 +0200)
added patches:
mount-handle-null-values-in-mnt_ns_release.patch

queue-6.12/mount-handle-null-values-in-mnt_ns_release.patch [new file with mode: 0644]
queue-6.12/series

diff --git a/queue-6.12/mount-handle-null-values-in-mnt_ns_release.patch b/queue-6.12/mount-handle-null-values-in-mnt_ns_release.patch
new file mode 100644 (file)
index 0000000..e597c57
--- /dev/null
@@ -0,0 +1,30 @@
+From 6c7ca6a02f8f9549a438a08a23c6327580ecf3d6 Mon Sep 17 00:00:00 2001
+From: Christian Brauner <brauner@kernel.org>
+Date: Mon, 29 Sep 2025 11:41:16 +0200
+Subject: mount: handle NULL values in mnt_ns_release()
+
+From: Christian Brauner <brauner@kernel.org>
+
+commit 6c7ca6a02f8f9549a438a08a23c6327580ecf3d6 upstream.
+
+When calling in listmount() mnt_ns_release() may be passed a NULL
+pointer. Handle that case gracefully.
+
+Signed-off-by: Christian Brauner <brauner@kernel.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/namespace.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/namespace.c
++++ b/fs/namespace.c
+@@ -153,7 +153,7 @@ static void mnt_ns_release(struct mnt_na
+       lockdep_assert_not_held(&mnt_ns_tree_lock);
+       /* keep alive for {list,stat}mount() */
+-      if (refcount_dec_and_test(&ns->passive)) {
++      if (ns && refcount_dec_and_test(&ns->passive)) {
+               put_user_ns(ns->user_ns);
+               kfree(ns);
+       }
index 6c2b625eebf3f0275ec13f36f5665f5882ecfc00..c854c235aac42c2221efd7457bf5aaeb467b9f50 100644 (file)
@@ -274,3 +274,4 @@ perf-test-stat-avoid-hybrid-assumption-when-virtualized.patch
 nfsd-fix-__fh_verify-for-localio.patch
 nfsd-fix-access-checking-for-nlm-under-xprtsec-policies.patch
 asoc-sof-ipc4-pcm-fix-start-offset-calculation-for-chain-dma.patch
+mount-handle-null-values-in-mnt_ns_release.patch