From: Greg Kroah-Hartman Date: Sun, 19 Oct 2025 12:12:20 +0000 (+0200) Subject: 6.12-stable patches X-Git-Tag: v5.15.195~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b38bf9bd68243138a47fae146931fa41e9d0b850;p=thirdparty%2Fkernel%2Fstable-queue.git 6.12-stable patches added patches: mount-handle-null-values-in-mnt_ns_release.patch --- 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 index 0000000000..e597c57e5b --- /dev/null +++ b/queue-6.12/mount-handle-null-values-in-mnt_ns_release.patch @@ -0,0 +1,30 @@ +From 6c7ca6a02f8f9549a438a08a23c6327580ecf3d6 Mon Sep 17 00:00:00 2001 +From: Christian Brauner +Date: Mon, 29 Sep 2025 11:41:16 +0200 +Subject: mount: handle NULL values in mnt_ns_release() + +From: Christian Brauner + +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 +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman +--- + 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); + } diff --git a/queue-6.12/series b/queue-6.12/series index 6c2b625eeb..c854c235aa 100644 --- a/queue-6.12/series +++ b/queue-6.12/series @@ -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