]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: use dst_dev_rcu() in sk_setup_caps()
authorEric Dumazet <edumazet@google.com>
Thu, 28 Aug 2025 19:58:20 +0000 (19:58 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sat, 30 Aug 2025 02:36:32 +0000 (19:36 -0700)
commit99a2ace61b211b0be861b07fbaa062fca4b58879
tree12caebe1df6c6c329c3206be82c95a7348110045
parent11709573cc4e48dc34c80fc7ab9ce5b159e29695
net: use dst_dev_rcu() in sk_setup_caps()

Use RCU to protect accesses to dst->dev from sk_setup_caps()
and sk_dst_gso_max_size().

Also use dst_dev_rcu() in ip6_dst_mtu_maybe_forward(),
and ip_dst_mtu_maybe_forward().

ip4_dst_hoplimit() can use dst_dev_net_rcu().

Fixes: 4a6ce2b6f2ec ("net: introduce a new function dst_dev_put()")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20250828195823.3958522-6-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/ip.h
include/net/ip6_route.h
include/net/route.h
net/core/sock.c