summaryrefslogtreecommitdiff
path: root/tools/testing/kunit/kunit.py
diff options
context:
space:
mode:
authorMartin KaFai Lau <kafai@fb.com>2020-07-08 23:11:04 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2020-07-09 22:03:31 +0200
commitf3dda7a679df183e798b86e7b6ec05ab35476de3 (patch)
tree5546f846bf465d85da12656e19b9fa40d20c180b /tools/testing/kunit/kunit.py
parent365f9ae4ee36037e2a9268fe7296065356840b4c (diff)
bpf: net: Avoid copying sk_user_data of reuseport_array during sk_clone
It makes little sense for copying sk_user_data of reuseport_array during sk_clone_lock(). This patch reuses the SK_USER_DATA_NOCOPY bit introduced in commit f1ff5ce2cd5e ("net, sk_msg: Clear sk_user_data pointer on clone if tagged"). It is used to mark the sk_user_data is not supposed to be copied to its clone. Although the cloned sk's sk_user_data will not be used/freed in bpf_sk_reuseport_detach(), this change can still allow the cloned sk's sk_user_data to be used by some other means. Freeing the reuseport_array's sk_user_data does not require a rcu grace period. Thus, the existing rcu_assign_sk_user_data_nocopy() is not used. Fixes: 5dc4c4b7d4e8 ("bpf: Introduce BPF_MAP_TYPE_REUSEPORT_SOCKARRAY") Signed-off-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com> Link: https://lore.kernel.org/bpf/20200709061104.4018798-1-kafai@fb.com
Diffstat (limited to 'tools/testing/kunit/kunit.py')
0 files changed, 0 insertions, 0 deletions