summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKuniyuki Iwashima <kuniyu@google.com>2026-05-02 06:13:01 +0300
committerJakub Kicinski <kuba@kernel.org>2026-05-06 03:47:05 +0300
commit4f71dd1b421d1300237adf546aa14521cdf46355 (patch)
tree578b30191f9961775649e8c74008bbdb8c7fdf04 /include
parent027bffa1ad19f5da59ee7923464dd248b0a9930f (diff)
downloadlinux-4f71dd1b421d1300237adf546aa14521cdf46355.tar.xz
vxlan: Free vxlan_sock with kfree_rcu().
We will remove synchronize_rcu() in udp_tunnel_sock_release(). We must ensure that vxlan_sock is freed after inflight RX fast path. Let's free vxlan_sock with kfree_rcu(). Note that vxlan_sock.vni_list[] is 8K and struct rcu_head must be placed before it. Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://patch.msgid.link/20260502031401.3557229-9-kuniyu@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/vxlan.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/vxlan.h b/include/net/vxlan.h
index 8b52294b2902..dfba89695efc 100644
--- a/include/net/vxlan.h
+++ b/include/net/vxlan.h
@@ -186,6 +186,7 @@ struct vxlan_metadata {
struct vxlan_sock {
struct hlist_node hlist;
struct sock *sk;
+ struct rcu_head rcu;
struct hlist_head vni_list[VNI_HASH_SIZE];
refcount_t refcnt;
u32 flags;