Blamed commit missed that both functions can be called with dev == NULL. Fixes: 6f1a9140ecda ("net: add xmit recursion limit to tunnel xmit functions") Signed-off-by: Eric Dumazet CC: Weiming Shi --- include/net/ip6_tunnel.h | 2 +- net/ipv4/ip_tunnel_core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/net/ip6_tunnel.h b/include/net/ip6_tunnel.h index 1253cbb4b0a45f1c62999be21931ca31b596697f..b964b31e8757858ffafe47d003028d9a2640751c 100644 --- a/include/net/ip6_tunnel.h +++ b/include/net/ip6_tunnel.h @@ -158,7 +158,7 @@ static inline void ip6tunnel_xmit(struct sock *sk, struct sk_buff *skb, if (dev_recursion_level() > IP_TUNNEL_RECURSION_LIMIT) { net_crit_ratelimited("Dead loop on virtual device %s, fix it urgently!\n", - dev->name); + dev ? dev->name : "null"); DEV_STATS_INC(dev, tx_errors); kfree_skb(skb); return; diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c index b1b6bf949f65ab7a09ba201d48aa204d913f146d..0496b7e2b94e15e2f471d1cd82e0019ba5fedb1d 100644 --- a/net/ipv4/ip_tunnel_core.c +++ b/net/ipv4/ip_tunnel_core.c @@ -60,7 +60,7 @@ void iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb, if (dev_recursion_level() > IP_TUNNEL_RECURSION_LIMIT) { net_crit_ratelimited("Dead loop on virtual device %s, fix it urgently!\n", - dev->name); + dev ? dev->name : "null"); DEV_STATS_INC(dev, tx_errors); ip_rt_put(rt); kfree_skb(skb); -- 2.53.0.473.g4a7958ca14-goog