mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Ahern <dsahern@kernel.org>
To: Jiayuan Chen <jiayuan.chen@linux.dev>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, Jiayuan Chen <jiayuan.chen@shopee.com>,
	syzbot+334190e097a98a1b81bb@syzkaller.appspotmail.com,
	"David S. Miller" <davem@davemloft.net>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v1] net: nexthop: fix panic when IPv4 route references IPv6 nexthop
Date: Sun, 1 Mar 2026 11:05:17 -0700	[thread overview]
Message-ID: <b2c3b7c5-df56-4f5f-a51e-fc76257dddad@kernel.org> (raw)
In-Reply-To: <d3722ec10046a2fde021a2b8a51a83431c8bcbac@linux.dev>

On 2/28/26 6:57 PM, Jiayuan Chen wrote:
> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> index c0350d97307e..4e7c44101709 100644
> --- a/net/ipv6/route.c
> +++ b/net/ipv6/route.c
> @@ -3643,6 +3643,12 @@ int fib6_nh_init(struct net *net, struct fib6_nh *fib6_nh,
>                                 goto out;
>                         }
>                 }
> +               fib6_nh->nh_common.nhc_pcpu_rth_output =
> +                       alloc_percpu_gfp(struct rtable __rcu *, gfp_flags);
> +               if (!fib6_nh->nh_common.nhc_pcpu_rth_output) {
> +                       err = -ENOMEM;
> +                       goto out;
> +               }
>                 goto pcpu_alloc;
>         }
> 
>

Already done by  fib6_nh_init -> fib_nh_common_init():

        nhc->nhc_pcpu_rth_output = alloc_percpu_gfp(struct rtable __rcu *,
                                                    gfp_flags);
        if (!nhc->nhc_pcpu_rth_output)
                return -ENOMEM;




  reply	other threads:[~2026-03-01 18:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-28  3:13 Jiayuan Chen
2026-02-28 15:39 ` Jakub Kicinski
2026-02-28 16:33   ` David Ahern
2026-02-28 17:04     ` Eric Dumazet
2026-03-01  1:57       ` Jiayuan Chen
2026-03-01 18:05         ` David Ahern [this message]
2026-03-01 18:11         ` David Ahern

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=b2c3b7c5-df56-4f5f-a51e-fc76257dddad@kernel.org \
    --to=dsahern@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jiayuan.chen@linux.dev \
    --cc=jiayuan.chen@shopee.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=syzbot+334190e097a98a1b81bb@syzkaller.appspotmail.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

all inboxes | Powered by JetHome®