From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konstantin Khorenko Date: Fri, 21 Aug 2026 18:42:27 +0200 Subject: [Devel] [PATCH RHEL10 COMMIT] net/unix: fix unix_stream_recvmsg() build with CONFIG_BPF_SYSCALL=n In-Reply-To: <20260821163718.187766-28-khorenko@virtuozzo.com> Message-ID: <202608211642.67LGgRb2668335@f0.sw.ru> List-Id: The commit is pushed to "branch-rh10-6.12.0-211.39.1.16.x.vz10-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git after rh10-6.12.0-211.39.1.16.6.vz10 ------> commit 9653e667efe1c8ea07954bb0b39f1a5116445afd Author: Konstantin Khorenko Date: Fri Aug 21 18:37:13 2026 +0200 net/unix: fix unix_stream_recvmsg() build with CONFIG_BPF_SYSCALL=n The MSG_ERRQUEUE path of unix_stream_recvmsg() passes the socket to unix_recv_error(), but 'sk' is declared inside the CONFIG_BPF_SYSCALL block a few lines above, so the function does not build without that option: net/unix/af_unix.c:3073:40: error: 'sk' undeclared (first use in this function) x86_64 defconfig and the User Mode Linux defconfig - the one we want for KUnit - both have CONFIG_BPF_SYSCALL=n, so neither has ever built this file. Declare 'sk' unconditionally; the BPF block keeps its own 'prot'. Fixes: c9ccba858dd1 ("net: zerocopy over unix sockets") Feature: net: zerocopy over unix sockets https://virtuozzo.atlassian.net/browse/VSTOR-134732 Signed-off-by: Konstantin Khorenko --- net/unix/af_unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index fa9038e89f838..7a37c06a097c4 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -3060,9 +3060,9 @@ static int unix_stream_recvmsg(struct socket *sock, struct msghdr *msg, .size = size, .flags = flags }; + struct sock *sk = sock->sk; #ifdef CONFIG_BPF_SYSCALL - struct sock *sk = sock->sk; const struct proto *prot = READ_ONCE(sk->sk_prot); if (prot != &unix_stream_proto)