mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
net: ipv6: fib: flush exceptions when purging route
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. Change-Id: I9df223ea065379a6e812a88dbc4ed28a26ee62dd Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
This commit is contained in:
parent
4afb66961f
commit
d380e5a0a5
1 changed files with 2 additions and 3 deletions
|
|
@ -973,6 +973,8 @@ static void fib6_purge_rt(struct fib6_info *rt, struct fib6_node *fn,
|
|||
{
|
||||
struct fib6_table *table = rt->fib6_table;
|
||||
|
||||
/* Flush all cached dst in exception table */
|
||||
rt6_flush_exceptions(rt);
|
||||
fib6_drop_pcpu_from(rt, table);
|
||||
|
||||
if (rt->nh && !list_empty(&rt->nh_list))
|
||||
|
|
@ -1839,9 +1841,6 @@ static void fib6_del_route(struct fib6_table *table, struct fib6_node *fn,
|
|||
net->ipv6.rt6_stats->fib_rt_entries--;
|
||||
net->ipv6.rt6_stats->fib_discarded_routes++;
|
||||
|
||||
/* Flush all cached dst in exception table */
|
||||
rt6_flush_exceptions(rt);
|
||||
|
||||
/* Reset round-robin state, if necessary */
|
||||
if (rcu_access_pointer(fn->rr_ptr) == rt)
|
||||
fn->rr_ptr = NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue