Skip to content

Commit

Permalink
net/ipv6: stop leaking percpu memory in fib6 info
Browse files Browse the repository at this point in the history
The fib6_info_alloc() function allocates percpu memory to hold per CPU
pointers to rt6_info, but this memory is never freed. Fix it.

Fixes: a64efe1 ("net/ipv6: introduce fib6_info struct and helpers")
Signed-off-by: Mike Rapoport <[email protected]>
Reviewed-by: David Ahern <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
rppt authored and davem330 committed Oct 11, 2018
1 parent 49b538e commit 7abab7b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/ipv6/ip6_fib.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ void fib6_info_destroy_rcu(struct rcu_head *head)
*ppcpu_rt = NULL;
}
}

free_percpu(f6i->rt6i_pcpu);
}

lwtstate_put(f6i->fib6_nh.nh_lwtstate);
Expand Down

0 comments on commit 7abab7b

Please sign in to comment.