From: David Miller <davem@davemloft.net>
To: dsahern@kernel.org
Cc: netdev@vger.kernel.org, dsahern@gmail.com
Subject: Re: [PATCH net-next] ipv6: Always allocate pcpu memory in a fib6_nh
Date: Tue, 04 Jun 2019 14:55:22 -0700 (PDT) [thread overview]
Message-ID: <20190604.145522.1019698960837846036.davem@davemloft.net> (raw)
In-Reply-To: <20190604013703.2043-1-dsahern@kernel.org>
From: David Ahern <dsahern@kernel.org>
Date: Mon, 3 Jun 2019 18:37:03 -0700
> From: David Ahern <dsahern@gmail.com>
>
> A recent commit had an unintended side effect with reject routes:
> rt6i_pcpu is expected to always be initialized for all fib6_info except
> the null entry. The commit mentioned below skips it for reject routes
> and ends up leaking references to the loopback device. For example,
>
> ip netns add foo
> ip -netns foo li set lo up
> ip -netns foo -6 ro add blackhole 2001:db8:1::1
> ip netns exec foo ping6 2001:db8:1::1
> ip netns del foo
>
> ends up spewing:
> unregister_netdevice: waiting for lo to become free. Usage count = 3
>
> The fib_nh_common_init is not needed for reject routes (no ipv4 caching
> or encaps), so move the alloc_percpu_gfp after it and adjust the goto label.
>
> Fixes: f40b6ae2b612 ("ipv6: Move pcpu cached routes to fib6_nh")
> Signed-off-by: David Ahern <dsahern@gmail.com>
Applied.
prev parent reply other threads:[~2019-06-04 21:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-04 1:37 [PATCH net-next] ipv6: Always allocate pcpu memory in a fib6_nh David Ahern
2019-06-04 21:55 ` David Miller [this message]
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=20190604.145522.1019698960837846036.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=dsahern@kernel.org \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).