public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>, davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
	andrew+netdev@lunn.ch, horms@kernel.org
Subject: Re: [PATCH net] ipv6: fix NULL pointer deref in ip6_rt_get_dev_rcu()
Date: Sun, 1 Mar 2026 18:38:53 -0700	[thread overview]
Message-ID: <859d39ff-cb1e-4f3f-b154-d8bf2c7997c9@kernel.org> (raw)
In-Reply-To: <20260301194548.927324-1-kuba@kernel.org>

On 3/1/26 12:45 PM, Jakub Kicinski wrote:
> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> index 85df25c36409..7db0c837196c 100644
> --- a/net/ipv6/route.c
> +++ b/net/ipv6/route.c
> @@ -1063,7 +1063,8 @@ static struct net_device *ip6_rt_get_dev_rcu(const struct fib6_result *res)
>  		 */
>  		if (netif_is_l3_slave(dev) &&
>  		    !rt6_need_strict(&res->f6i->fib6_dst.addr))
> -			dev = l3mdev_master_dev_rcu(dev);
> +			dev = l3mdev_master_dev_rcu(dev) ? :
> +			      dev_net(dev)->loopback_dev;

how can the flag on the netdev say there is L3 master, yet the device
not be there within an rcu window?


>  		else if (!netif_is_l3_master(dev))
>  			dev = dev_net(dev)->loopback_dev;
>  		/* last case is netif_is_l3_master(dev) is true in which


  reply	other threads:[~2026-03-02  1:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-01 19:45 [PATCH net] ipv6: fix NULL pointer deref in ip6_rt_get_dev_rcu() Jakub Kicinski
2026-03-02  1:38 ` David Ahern [this message]
2026-03-02 14:43   ` Jakub Kicinski
2026-03-03  0:09 ` David Ahern
2026-03-04  1:30 ` 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=859d39ff-cb1e-4f3f-b154-d8bf2c7997c9@kernel.org \
    --to=dsahern@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox