Thread (4 messages) flat view 4 messages, 4 authors, 3d ago
WARM3d

[PATCH net-next] sit: do not report an error from ipip6_fill_info()

From: Eric Dumazet <edumazet@google.com>
Date: 2026-09-12 00:54:44
Subsystem: networking [general], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

ipip6_fill_info() returns -ENODEV if tunnel->sit_parms is NULL.

This can not happen yet: sit_parms is only cleared from
ipip6_dev_free(), the priv_destructor, which runs long after
RTM_DELLINK has been built.

Returning an error from a fill_info() handler is still a trap,
because rtnl_dump_ifinfo() stops at the first failure and propagates
it, letting one device hide all the remaining ones.

Return 0 instead, there is nothing to report for a device that is
going away.

Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 net/ipv6/sit.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 14ba3cfb304a83ee37e3be5b09a57c371f1977c3..a7ec800216ade169985d389ad1dc672f0358f4ee 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -1853,9 +1853,10 @@ static int ipip6_fill_info(struct sk_buff *skb, const struct net_device *dev)
 
 	rcu_read_lock();
 	parm = rcu_dereference(tunnel->sit_parms);
+	/* If the device is being dismantled, there is nothing to report. */
 	if (!parm) {
 		rcu_read_unlock();
-		return -ENODEV;
+		return 0;
 	}
 
 	if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) ||
-- 
2.55.0.1007.g17ff1f9808-goog
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help