Files
android_kernel_fxtec_sm6115/include/linux
Lorenz Bauer ff9f2d9cda BACKPORT: net: sk_msg: Simplify sk_psock initialization
Initializing psock->sk_proto and other saved callbacks is only
done in sk_psock_update_proto, after sk_psock_init has returned.
The logic for this is difficult to follow, and needlessly complex.

Instead, initialize psock->sk_proto whenever we allocate a new
psock. Additionally, assert the following invariants:

* The SK has no ULP: ULP does it's own finagling of sk->sk_prot
* sk_user_data is unused: we need it to store sk_psock

Protect our access to sk_user_data with sk_callback_lock, which
is what other users like reuseport arrays, etc. do.

The result is that an sk_psock is always fully initialized, and
that psock->sk_proto is always the "original" struct proto.
The latter allows us to use psock->sk_proto when initializing
IPv6 TCP / UDP callbacks for sockmap.

Also fix skmsg.c compilation, and align include/linux/bpf.h

Change-Id: If8d7b6a9e3b7341d0dba5705e0f2044234f39fd3
Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20200821102948.21918-2-lmb@cloudflare.com
2026-02-02 18:01:33 -05:00
..
2025-08-31 10:10:00 +01:00
2025-09-30 21:35:03 +01:00
2025-09-22 10:17:51 +02:00
2025-09-16 13:55:10 +02:00
2025-08-28 03:26:18 +03:00