diff options
| author | 2026-05-02 03:13:00 +0000 | |
|---|---|---|
| committer | 2026-05-05 17:47:04 -0700 | |
| commit | 027bffa1ad19f5da59ee7923464dd248b0a9930f (patch) | |
| tree | 1acc81610e900ab154d58e10549eccaee9b72406 /scripts/Makefile.thinlto | |
| parent | vxlan: Fix potential null-ptr-deref in vxlan_gro_prepare_receive(). (diff) | |
vxlan: Store struct sock in struct vxlan_sock.
Commit 3cf7203ca620 ("net/tunnel: wait until all sk_user_data
reader finish before releasing the sock") added synchronize_rcu()
in udp_tunnel_sock_release().
This was intended to protect the fast path of a dying vxlan device
from dereferencing vxlan_sock->sock->sk after sock_orphan() has set
sock->sk to NULL.
However, vxlan does not need to access struct socket itself in the
fast path; it only reads struct sock, and struct socket is only
used for tunnel setup and teardown.
Let's store struct sock directly in struct vxlan_sock.
In the next patch, we will free vxlan_sock with kfree_rcu(), then
vxlan no longer needs synchronize_rcu() in udp_tunnel_sock_release().
Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260502031401.3557229-8-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
