aboutsummaryrefslogtreecommitdiffstats
path: root/net/dsa/conduit.c
diff options
context:
space:
mode:
authorEric Dumazet <[email protected]>2025-06-30 12:19:30 +0000
committerJakub Kicinski <[email protected]>2025-07-02 21:32:30 +0000
commit88fe14253e181878c2ddb51a298ae8c468a63010 (patch)
tree286cfc2407b49e5e9e55129f020d7ee8a393c052 /net/dsa/conduit.c
parentnet: dst: annotate data-races around dst->output (diff)
downloadkernel-88fe14253e181878c2ddb51a298ae8c468a63010.tar.gz
kernel-88fe14253e181878c2ddb51a298ae8c468a63010.zip
net: dst: add four helpers to annotate data-races around dst->dev
dst->dev is read locklessly in many contexts, and written in dst_dev_put(). Fixing all the races is going to need many changes. We probably will have to add full RCU protection. Add three helpers to ease this painful process. static inline struct net_device *dst_dev(const struct dst_entry *dst) { return READ_ONCE(dst->dev); } static inline struct net_device *skb_dst_dev(const struct sk_buff *skb) { return dst_dev(skb_dst(skb)); } static inline struct net *skb_dst_dev_net(const struct sk_buff *skb) { return dev_net(skb_dst_dev(skb)); } static inline struct net *skb_dst_dev_net_rcu(const struct sk_buff *skb) { return dev_net_rcu(skb_dst_dev(skb)); } Fixes: 4a6ce2b6f2ec ("net: introduce a new function dst_dev_put()") Signed-off-by: Eric Dumazet <[email protected]> Reviewed-by: Kuniyuki Iwashima <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/dsa/conduit.c')
0 files changed, 0 insertions, 0 deletions