diff --git a/net/ipv6/route.c b/net/ipv6/route.c index be5e65c97652..c59e97cf9d25 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -5632,6 +5632,7 @@ int rt6_dump_route(struct fib6_info *rt, void *p_arg, unsigned int skip) .count = 0 }; int err; + rcu_read_lock(); if (rt->nh) { err = nexthop_for_each_fib6_nh(rt->nh, rt6_nh_dump_exceptions, @@ -5639,6 +5640,7 @@ int rt6_dump_route(struct fib6_info *rt, void *p_arg, unsigned int skip) } else { err = rt6_nh_dump_exceptions(rt->fib6_nh, &w); } + rcu_read_unlock(); if (err) return count += w.count;