diff options
author | 2017-10-06 12:06:05 -0700 | |
---|---|---|
committer | 2017-10-07 21:22:58 +0100 | |
commit | 51e398e86d61b69b9a4be49ff7f6afeb87530df1 (patch) | |
tree | b37f6853d0bdedc6a46cd44d1f2484208ace1ca5 /include/net/switchdev.h | |
parent | ipv6: grab rt->rt6i_ref before allocating pcpu rt (diff) | |
download | wireguard-linux-51e398e86d61b69b9a4be49ff7f6afeb87530df1.tar.xz wireguard-linux-51e398e86d61b69b9a4be49ff7f6afeb87530df1.zip |
ipv6: don't release rt->rt6i_pcpu memory during rt6_release()
After rwlock is replaced with rcu and spinlock, route lookup can happen
simultanously with route deletion.
This patch removes the call to free_percpu(rt->rt6i_pcpu) from
rt6_release() to avoid the race condition between rt6_release() and
rt6_get_pcpu_route(). And as free_percpu(rt->rt6i_pcpu) is already
called in ip6_dst_destroy() after the rcu grace period, it is safe to do
this change.
Signed-off-by: Wei Wang <weiwan@google.com>
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/switchdev.h')
0 files changed, 0 insertions, 0 deletions