]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
geneve: Remove synchronize_net() in geneve_sock_release().
authorKuniyuki Iwashima <kuniyu@google.com>
Mon, 18 May 2026 05:07:09 +0000 (05:07 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 21 May 2026 02:12:29 +0000 (19:12 -0700)
vxlan previously had an issue where the fast path could access
stale pointers, which was fixed by commit c6fcc4fc5f8b ("vxlan:
avoid using stale vxlan socket.").

geneve later followed the same pattern, and commit fceb9c3e3825
("geneve: avoid using stale geneve socket.") copied synchronize_net()
from vxlan_sock_release() into geneve_sock_release().

However, that change occurred after commit ca065d0cf80f ("udp: no
longer use SLAB_DESTROY_BY_RCU"), and geneve had already been
using kfree_rcu() to free geneve_sock.

Therefore, the synchronize_net() was never actually needed there.

Let's remove the redundant synchronize_net() in geneve_sock_release().

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260518050726.318824-3-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/geneve.c

index b36fad83372457091312c3c3529b5b2dbda5a6f3..4e5d0a09a82deb29f34a462d6441d55d374c7889 100644 (file)
@@ -1032,7 +1032,6 @@ static void geneve_sock_release(struct geneve_dev *geneve)
 #endif
 
        rcu_assign_pointer(geneve->sock4, NULL);
-       synchronize_net();
 
        __geneve_sock_release(gs4);
 #if IS_ENABLED(CONFIG_IPV6)