From: Eric Dumazet Date: Tue, 23 Apr 2019 01:35:01 +0000 (-0700) Subject: ipv6: fib6_info_destroy_rcu() cleanup X-Git-Tag: v5.4-rc1~1056^2~120^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b0270550229b3efeadfcac1cf04415dfea27915e;p=platform%2Fkernel%2Flinux-rpi.git ipv6: fib6_info_destroy_rcu() cleanup We do not need to clear f6i->rt6i_exception_bucket right before freeing f6i. Note that f6i->rt6i_exception_bucket is properly protected by f6i->exception_bucket_flushed being set to one in rt6_flush_exceptions() under the protection of rt6_exception_lock. Signed-off-by: Eric Dumazet Cc: Wei Wang Acked-by: Wei Wang Reviewed-by: David Ahern Signed-off-by: David S. Miller --- diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index b47e15d..5519385 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c @@ -175,10 +175,7 @@ void fib6_info_destroy_rcu(struct rcu_head *head) WARN_ON(f6i->fib6_node); bucket = rcu_dereference_protected(f6i->rt6i_exception_bucket, 1); - if (bucket) { - f6i->rt6i_exception_bucket = NULL; - kfree(bucket); - } + kfree(bucket); if (f6i->rt6i_pcpu) { int cpu;