mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-04-03 12:05:13 +02:00
vsock: fix vsock_proto declaration
[ Upstream commit1e3b66e326] From commit634f1a7110("vsock: support sockmap"), `struct proto vsock_proto`, defined in af_vsock.c, is not static anymore, since it's used by vsock_bpf.c. If CONFIG_BPF_SYSCALL is not defined, `make C=2` will print a warning: $ make O=build C=2 W=1 net/vmw_vsock/ ... CC [M] net/vmw_vsock/af_vsock.o CHECK ../net/vmw_vsock/af_vsock.c ../net/vmw_vsock/af_vsock.c:123:14: warning: symbol 'vsock_proto' was not declared. Should it be static? Declare `vsock_proto` regardless of CONFIG_BPF_SYSCALL, since it's defined in af_vsock.c, which is built regardless of CONFIG_BPF_SYSCALL. Fixes:634f1a7110("vsock: support sockmap") Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Link: https://patch.msgid.link/20250703112329.28365-1-sgarzare@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4b8e18af7b
commit
8fb2802a16
@@ -242,8 +242,8 @@ int __vsock_dgram_recvmsg(struct socket *sock, struct msghdr *msg,
|
||||
int vsock_dgram_recvmsg(struct socket *sock, struct msghdr *msg,
|
||||
size_t len, int flags);
|
||||
|
||||
#ifdef CONFIG_BPF_SYSCALL
|
||||
extern struct proto vsock_proto;
|
||||
#ifdef CONFIG_BPF_SYSCALL
|
||||
int vsock_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore);
|
||||
void __init vsock_bpf_build_proto(void);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user