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-11-21 22:57:50 +00:00
2025-08-31 10:10:00 +01:00
2025-10-16 21:01:06 +01:00
2025-10-16 21:01:12 +01:00
2025-09-02 08:35:50 +00:00
2025-10-05 09:11:31 +00:00
2025-10-16 21:01:06 +01:00
2025-09-30 21:35:03 +01:00
2025-12-22 04:34:10 +01:00
2025-09-22 10:17:52 +02:00
2025-08-28 03:27:41 +03:00
2025-08-28 03:27:45 +03:00
2026-02-02 18:01:33 -05:00
2025-08-28 03:28:47 +03:00
2025-08-28 03:28:38 +03:00
2025-08-28 03:27:13 +03:00
2026-02-02 18:01:33 -05:00
2025-08-28 03:27:30 +03:00
2025-08-28 03:27:57 +03:00
2025-08-28 03:28:11 +03:00
2025-09-08 01:34:41 -04:00
2025-09-08 01:35:16 -04:00
2025-08-28 03:29:06 +03:00
2025-08-28 03:26:25 +03:00
2025-08-28 03:26:34 +03:00
2025-12-31 12:15:33 +02:00
2025-08-28 03:26:52 +03:00
2025-08-28 03:26:52 +03:00
2025-08-28 03:26:52 +03:00
2025-08-28 03:26:52 +03:00
2025-08-28 03:26:52 +03:00
2026-01-23 15:34:20 +00:00
2025-08-28 03:28:07 +03:00
2025-09-30 21:35:04 +01:00
2025-08-28 03:29:12 +03:00
2025-08-28 03:26:37 +03:00
2025-10-16 21:01:10 +01:00
2025-09-02 08:35:50 +00:00
2025-10-05 09:11:31 +00:00
2025-08-31 10:09:52 +01:00
2025-08-28 03:25:36 +03:00
2025-12-31 12:15:33 +02:00
2026-01-21 21:23:37 +00:00
2025-10-16 21:01:10 +01:00
2025-08-31 10:09:52 +01:00
2025-10-16 21:01:16 +01:00
2025-09-30 21:35:03 +01:00
2025-10-17 15:32:06 +01:00
2025-09-30 21:35:04 +01:00
2025-09-16 13:55:16 +02:00
2025-10-17 18:58:06 +01:00
2025-09-02 08:35:50 +00:00
2025-09-30 21:35:04 +01:00
2025-10-16 21:01:06 +01:00
2025-08-28 03:25:44 +03:00
2025-09-30 21:35:04 +01:00
2025-09-30 21:35:04 +01:00
2025-09-30 21:35:03 +01:00
2025-10-16 21:01:06 +01:00
2025-08-28 03:26:34 +03:00
2025-10-16 21:01:06 +01:00
2025-09-30 21:35:04 +01:00
2025-08-28 03:26:34 +03:00
2025-09-02 08:35:50 +00:00
2025-10-16 21:01:10 +01:00
2025-08-28 03:26:29 +03:00
2025-08-28 03:28:51 +03:00
2025-09-30 21:35:04 +01:00
2025-09-08 01:35:15 -04:00
2025-09-08 01:35:15 -04:00
2025-09-02 08:35:50 +00:00
2025-09-08 01:35:14 -04:00
2025-09-30 21:35:04 +01:00
2025-09-08 01:34:41 -04:00
2026-01-21 21:23:37 +00:00
2025-09-30 21:35:04 +01:00
2025-10-17 15:32:07 +01:00
2025-08-28 03:26:34 +03:00
2025-08-28 03:27:42 +03:00
2025-08-31 23:56:41 +08:00
2025-12-04 00:28:29 +02:00
2025-09-30 21:35:02 +01:00
2025-09-22 10:17:51 +02:00
2025-08-28 03:26:34 +03:00
2025-09-30 21:35:03 +01:00
2025-10-16 21:01:06 +01:00
2025-10-16 21:01:06 +01:00
2025-10-05 09:11:31 +00:00
2025-09-30 21:35:04 +01:00
2025-08-28 03:27:08 +03:00
2025-10-17 15:32:06 +01:00
2025-09-30 21:35:04 +01:00
2025-10-16 21:01:06 +01:00
2025-10-16 21:01:06 +01:00
2025-10-16 21:01:06 +01:00
2025-10-16 21:01:06 +01:00
2025-09-16 13:55:10 +02:00
2025-08-28 03:26:34 +03:00
2025-08-28 03:27:16 +03:00
2025-08-28 03:26:18 +03:00
2025-09-02 08:35:50 +00:00
2025-08-31 10:09:54 +01:00
2025-08-28 03:26:25 +03:00
2025-10-17 19:01:57 +01:00
2025-08-28 03:28:51 +03:00
2025-08-28 03:27:50 +03:00
2025-09-30 21:35:04 +01:00
2025-09-30 21:35:04 +01:00
2025-10-16 21:01:12 +01:00
2025-09-08 01:35:15 -04:00
2025-09-30 21:35:04 +01:00
2025-10-17 19:01:57 +01:00
2025-10-05 09:11:31 +00:00
2026-02-02 18:01:33 -05:00
2025-08-28 03:28:07 +03:00
2025-08-28 03:28:08 +03:00
2025-08-28 03:28:56 +03:00
2025-09-30 21:35:04 +01:00
2025-08-28 03:27:09 +03:00
2025-10-16 21:01:06 +01:00
2025-12-31 12:15:33 +02:00
2025-10-16 21:01:06 +01:00
2025-08-28 03:26:34 +03:00
2025-08-28 03:27:39 +03:00
2025-08-28 03:26:34 +03:00
2025-08-28 03:26:29 +03:00
2025-09-02 08:35:50 +00:00
2025-09-02 08:35:50 +00:00
2025-10-17 17:31:44 +01:00
2025-08-28 03:28:09 +03:00
2025-08-28 03:27:30 +03:00
2026-01-21 21:23:37 +00:00
2025-08-28 03:28:30 +03:00
2025-10-16 21:01:10 +01:00
2025-08-28 03:25:30 +03:00
2025-08-31 10:10:02 +01:00
2025-08-28 03:26:34 +03:00
2025-08-28 03:26:34 +03:00
2025-09-30 21:35:04 +01:00
2025-08-28 03:29:03 +03:00