The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Wang Liang <wangliang74@huawei.com>,
	davem@davemloft.net, dsahern@kernel.org, edumazet@google.com,
	kuba@kernel.org, horms@kernel.org, kuniyu@amazon.com
Cc: yuehaibing@huawei.com, zhangchangzhong@huawei.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v3] ipv6: sit: fix skb_under_panic with overflowed needed_headroom
Date: Thu, 3 Apr 2025 13:50:33 +0200	[thread overview]
Message-ID: <fe13ece8-67ea-48c0-a155-0cb6d2bcfc52@redhat.com> (raw)
In-Reply-To: <20250401021617.1571464-1-wangliang74@huawei.com>

On 4/1/25 4:16 AM, Wang Liang wrote:
> @@ -1452,7 +1457,9 @@ static int ipip6_tunnel_init(struct net_device *dev)
>  	tunnel->dev = dev;
>  	strcpy(tunnel->parms.name, dev->name);
>  
> -	ipip6_tunnel_bind_dev(dev);
> +	err = ipip6_tunnel_bind_dev(dev);
> +	if (err)
> +		return err;
>  
>  	err = dst_cache_init(&tunnel->dst_cache, GFP_KERNEL);
>  	if (err)

I think you additionally need to propagate the error in
ipip6_tunnel_update() and handle it in ipip6_changelink() and
ipip6_tunnel_change().

Side note: possibly other virtual devices are prone to similar issue. I
suspect vxlan and gre. Could you please have a look?

Thanks,

Paolo


  reply	other threads:[~2025-04-03 11:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-01  2:16 [PATCH net v3] ipv6: sit: fix skb_under_panic with overflowed needed_headroom Wang Liang
2025-04-03 11:50 ` Paolo Abeni [this message]
2025-04-08  7:49   ` Wang Liang

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=fe13ece8-67ea-48c0-a155-0cb6d2bcfc52@redhat.com \
    --to=pabeni@redhat.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuniyu@amazon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=wangliang74@huawei.com \
    --cc=yuehaibing@huawei.com \
    --cc=zhangchangzhong@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox