Re: [PATCH v3 net-next 8/9] af_unix: Introduce SO_PASSRIGHTS.

From
Kuniyuki Iwashima <hidden>
Date
2025-05-15 20:38:29
Reply to
Willem de Bruijn, 2025-05-15
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Date: Thu, 15 May 2025 15:25:57 -0400
quoted
@@ -1879,6 +1886,13 @@ int sk_getsockopt(struct sock *sk, int level, int optname,
 		v.val = sk->sk_scm_pidfd;
 		break;
 
+	case SO_PASSRIGHTS:
+		if (!sk_is_unix(sk))
+			return -EOPNOTSUPP;
+
+		v.val = sk->sk_scm_rights;
Same question about lockless reading of the field.
Same applied here and in other places, but all readers in sendmsg()
is under lock_sock().
Thread (27 messages) 27 messages, 2 authors, last reply 2025-05-15
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help