Subject: linux-next: manual merge of the net-next tree with the vfs-brauner tree

From: Stephen Rothwell <[email-masked]>
Date: Mon, 26 May 2025 12:37:01 +1000

Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  net/unix/af_unix.c

between commit:

  fd0a109a0f6b ("net, pidfs: prepare for handing out pidfds for reaped sk->sk_peer_pid")

from the vfs-brauner tree and commit:

  3f84d577b79d ("af_unix: Inherit sk_flags at connect().")

from the net-next tree.

I fixed it up (see below) 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.

-- 
Cheers,
Stephen Rothwell

diff --cc net/unix/af_unix.c
index 59a64b2ced6e,bd507f74e35e..000000000000
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@@ -1711,10 -1627,12 +1705,12 @@@ restart
  	/* The way is open! Fastly set all the necessary fields... */
  
  	sock_hold(sk);
- 	unix_peer(newsk)	= sk;
- 	newsk->sk_state		= TCP_ESTABLISHED;
- 	newsk->sk_type		= sk->sk_type;
+ 	unix_peer(newsk) = sk;
+ 	newsk->sk_state = TCP_ESTABLISHED;
+ 	newsk->sk_type = sk->sk_type;
+ 	newsk->sk_scm_recv_flags = other->sk_scm_recv_flags;
 -	init_peercred(newsk);
 +	init_peercred(newsk, &peercred);
+ 
  	newu = unix_sk(newsk);
  	newu->listener = other;
  	RCU_INIT_POINTER(newsk->sk_wq, &newu->peer_wq);