net/ipv6: fix LOCKDEP issue in rt6_remove_exception_rt()
Subsystems (3)
PATCH 1/1 net/ipv6: fix LOCKDEP issue in rt6_remove_exception_rt()
rt6_remove_exception_rt() is called under rcu_read_lock() only.
We lock rt6_exception_lock a bit later, so we do not hold rt6_exception_lock yet.
Fixes 8a14e46f1402 ("net/ipv6: Fix missing rcu dereferences on from")
Signed-off-by Eric Dumazet <[email protected]>
Reported-by syzbot <[email protected]>
Cc David Ahern <[email protected]>
--- net/ipv6/route.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
net/ipv6/route.c +1 -2
@@ -1546,8 +1546,7 @@ static int rt6_remove_exception_rt(struct rt6_info *rt)struct fib6_info *from;int err; - from =rcu_dereference_protected (rt->from, -lockdep_is_held (&rt6_exception_lock)); + from =rcu_dereference (rt->from);if (!from || !(rt->rt6i_flags &RTF_CACHE ))return -EINVAL ;
Signature · 1 line
2.17.0.484.g0c8726318c-goog
Quoted 5 lines · Eric Dumazet
rt6_remove_exception_rt()is called underrcu_read_lock()only.We lock
rt6_exception_locka bit later, so we do not holdrt6_exception_lockyet.
Quoted 9 lines
Fixes 8a14e46f1402 ("net/ipv6: Fix missing rcu dereferences on from")Signed-off-by Eric Dumazet <[email protected]>Reported-by syzbot <[email protected]>Cc David Ahern <[email protected]>--- net/ipv6/route.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Acked-by David Ahern <[email protected]>
Thanks, Eric.
From: Eric Dumazet <[email protected]>
Date: Tue, 24 Apr 2018 09:22:49 -0700
Quoted 8 lines
rt6_remove_exception_rt()is called underrcu_read_lock()only.We lock
rt6_exception_locka bit later, so we do not holdrt6_exception_lockyet.Fixes 8a14e46f1402 ("net/ipv6: Fix missing rcu dereferences on from")Signed-off-by Eric Dumazet <[email protected]>Reported-by syzbot <[email protected]>
Applied, thanks Eric.