aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/route.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2025-06-30 12:19:31 +0000
committerJakub Kicinski <kuba@kernel.org>2025-07-02 14:32:30 -0700
commita74fc62eec155ca5a6da8ff3856f3dc87fe24558 (patch)
treed7e629c97015087e167aeaa02f52d23a6d8cd0d3 /include/net/route.h
parentnet: dst: add four helpers to annotate data-races around dst->dev (diff)
downloadlinux-a74fc62eec155ca5a6da8ff3856f3dc87fe24558.tar.gz
linux-a74fc62eec155ca5a6da8ff3856f3dc87fe24558.zip
ipv4: adopt dst_dev, skb_dst_dev and skb_dst_dev_net[_rcu]
Use the new helpers as a first step to deal with potential dst->dev races. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://patch.msgid.link/20250630121934.3399505-8-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/route.h')
-rw-r--r--include/net/route.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/route.h b/include/net/route.h
index 3d3d6048ffca..7ea840daa775 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -390,7 +390,7 @@ static inline int ip4_dst_hoplimit(const struct dst_entry *dst)
const struct net *net;
rcu_read_lock();
- net = dev_net_rcu(dst->dev);
+ net = dev_net_rcu(dst_dev(dst));
hoplimit = READ_ONCE(net->ipv4.sysctl_ip_default_ttl);
rcu_read_unlock();
}