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
2012-10-08 13:50:20 +10:30
2018-06-15 18:10:01 -03:00
2022-12-17 00:25:35 +02:00
2018-09-07 11:49:50 -07:00
2020-05-11 10:27:22 -07:00
2018-03-26 08:53:43 -06:00
2021-03-05 07:01:18 +01:00
2018-04-12 09:41:19 -07:00
2021-06-30 19:17:14 +02:00
2025-09-22 10:17:51 +02:00
2020-06-16 12:51:47 -07:00
2017-11-09 10:23:28 +01:00
2025-09-16 13:55:10 +02:00
2025-08-28 03:26:18 +03:00
2024-02-23 08:12:39 +01:00
2022-02-28 18:50:08 +05:30