diff --git a/net/ipv6/route.c b/net/ipv6/route.c index be5e65c97652d0c34d209f85c8295d6faf871990..c59e97cf9d25da3084098572896178b71fb28fe6 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;