All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>, David Ahern <dsahern@kernel.org>,
	Ido Schimmel <idosch@nvidia.com>,
	netdev@vger.kernel.org, eric.dumazet@gmail.com
Subject: Re: [PATCH net-next] sit: do not report an error from ipip6_fill_info()
Date: Sat, 12 Sep 2026 23:47:45 +0200	[thread overview]
Message-ID: <aqXIgX-n7nFWC7Di@lore-desk> (raw)
In-Reply-To: <20260912005442.1795813-1-edumazet@google.com>

[-- Attachment #1: Type: text/plain, Size: 1370 bytes --]

> 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>

Acked-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.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
> 
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  parent reply	other threads:[~2026-09-12 21:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-12  0:54 [PATCH net-next] sit: do not report an error from ipip6_fill_info() Eric Dumazet
2026-09-12  5:47 ` luoxuanqiang
2026-09-12 21:47 ` Lorenzo Bianconi [this message]
2026-09-15  2:10 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aqXIgX-n7nFWC7Di@lore-desk \
    --to=lorenzo.bianconi@oss.qualcomm.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.