Re: [net PATCH 1/2] net: ipv6: fib: flush exceptions when purging route

From
Jakub Kicinski <kuba@kernel.org>
Date
2021-01-07 20:05:21
Reply to
David Ahern, 2021-01-06
On Wed, 6 Jan 2021 09:55:09 -0700 David Ahern wrote:
On 1/5/21 5:22 PM, Sean Tranchetti wrote:
quoted
From: Sean Tranchetti <redacted>

Route removal is handled by two code paths. The main removal path is via
fib6_del_route() which will handle purging any PMTU exceptions from the
cache, removing all per-cpu copies of the DST entry used by the route, and
releasing the fib6_info struct.

The second removal location is during fib6_add_rt2node() during a route
replacement operation. This path also calls fib6_purge_rt() to handle
cleaning up the per-cpu copies of the DST entries and releasing the
fib6_info associated with the older route, but it does not flush any PMTU
exceptions that the older route had. Since the older route is removed from
the tree during the replacement, we lose any way of accessing it again.

As these lingering DSTs and the fib6_info struct are holding references to
the underlying netdevice struct as well, unregistering that device from the
kernel can never complete.
I think the right fixes tag is:

Fixes: 2b760fcf5cfb3 ("ipv6: hook up exception table to store dst cache")

cc'ed author of that patch.
quoted
Signed-off-by: Sean Tranchetti <redacted>
Reviewed-by: David Ahern <dsahern@kernel.org>
Applied, thanks!
Thread (5 messages) 5 messages, 3 authors, last reply 2021-01-07
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help