diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2026-05-28 03:27:29 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-05-28 03:27:29 +0300 |
| commit | 3cefa8d5e798c4e21a7ea48bf6370247fca3aa9d (patch) | |
| tree | 576d7befbd275ba831dbdd0fdc54249339a6849a /include | |
| parent | 5af067bf8a64dac896f120a98fe2ca656df92562 (diff) | |
| parent | 331d846a717243cec2d0708d30926efe97bb6294 (diff) | |
| download | linux-3cefa8d5e798c4e21a7ea48bf6370247fca3aa9d.tar.xz | |
Merge branch 'ipv6-frags-adopt-__in6_dev_stats_get-a-bit-more'
Eric Dumazet says:
====================
ipv6: frags: adopt __in6_dev_stats_get() a bit more
First patch addresses Sashiko's feedback about a potential
NULL dereference in __in6_dev_stats_get().
Second patch adopts __in6_dev_stats_get() in net/ipv6/reassembly.c.
====================
Link: https://patch.msgid.link/20260526145529.3587126-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/addrconf.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 9e96776945e5..539bbbe54b14 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h @@ -369,8 +369,11 @@ static inline struct inet6_dev *__in6_dev_get_rtnl_net(const struct net_device * static inline struct inet6_dev *__in6_dev_stats_get(const struct net_device *dev, const struct sk_buff *skb) { - if (netif_is_l3_master(dev)) + if (netif_is_l3_master(dev)) { dev = dev_get_by_index_rcu(dev_net(dev), inet6_iif(skb)); + if (!dev) + return NULL; + } return __in6_dev_get(dev); } |
