Subject: linux-next: manual merge of the vfs-brauner tree with the mm-nonmm-unstable tree

From: Stephen Rothwell <[email-masked]>
Date: Thu, 20 Nov 2025 11:44:55 +1100

Hi all,

Today's linux-next merge of the vfs-brauner tree got a semantic
conflict in:

  kernel/fork.c

between commit:

  42d3299e85f8 ("unshare: fix nsproxy leak on set_cred_ucounts() error path")

from the mm-nonmm-unstable tree and commit:

  cefd55bd2159 ("nsproxy: fix free_nsproxy() and simplify create_new_namespaces()")

from the vfs-brauner tree.

I fixed it up (I applied the following fix patch) and can carry the fix
as necessary. This is now fixed as far as linux-next is concerned, but
any non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

From: Stephen Rothwell <[email-masked]>
Date: Thu, 20 Nov 2025 11:20:10 +1100
Subject: [PATCH] fix up for "nsproxy: fix free_nsproxy() and simplify create_new_namespaces()"

from the vfs-brauner tree interacting with "unshare: fix nsproxy leak on
set_cred_ucounts() error path" from the mm-nonmm-unstable tree.

Signed-off-by: Stephen Rothwell <[email-masked]>
---
 kernel/fork.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/fork.c b/kernel/fork.c
index 829d6518f352..adef2595182b 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -3136,7 +3136,7 @@ int ksys_unshare(unsigned long unshare_flags)
 		err = set_cred_ucounts(new_cred);
 		if (err) {
 			if (new_nsproxy)
-				free_nsproxy(new_nsproxy);
+				deactivate_nsproxy(new_nsproxy);
 			goto bad_unshare_cleanup_cred;
 		}
 	}
-- 
2.51.1

-- 
Cheers,
Stephen Rothwell