mbox series

[bpf,0/2] bpf: net: Fixes in sk_user_data of reuseport_array

Message ID 20200708014413.1990641-1-kafai@fb.com
Headers show
Series bpf: net: Fixes in sk_user_data of reuseport_array | expand

Message

Martin KaFai Lau July 8, 2020, 1:44 a.m. UTC
This set fixes two issues on sk_user_data when a sk is added to
a reuseport_array.

The first patch is to avoid the sk_user_data being copied
to a cloned sk.  The second patch avoids doing bpf_sk_reuseport_detach()
on sk_user_data that is not managed by reuseport_array.

Since the changes are mostly related to bpf reuseport_array, so it is
currently tagged as bpf fixes.

Martin KaFai Lau (2):
  bpf: net: Avoid copying sk_user_data of reuseport_array during
    sk_clone
  bpf: net: Avoid incorrect bpf_sk_reuseport_detach call

 include/net/sock.h           |  3 ++-
 kernel/bpf/reuseport_array.c | 14 ++++++++++----
 2 files changed, 12 insertions(+), 5 deletions(-)