Commit 091311de authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

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: 8a14e46f ("net/ipv6: Fix missing rcu dereferences on from")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Reported-by: default avatarsyzbot <syzkaller@googlegroups.com>
Cc: David Ahern <dsahern@gmail.com>
Acked-by: default avatarDavid Ahern <dsahern@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 95ad7544
...@@ -1546,8 +1546,7 @@ static int rt6_remove_exception_rt(struct rt6_info *rt) ...@@ -1546,8 +1546,7 @@ static int rt6_remove_exception_rt(struct rt6_info *rt)
struct fib6_info *from; struct fib6_info *from;
int err; int err;
from = rcu_dereference_protected(rt->from, from = rcu_dereference(rt->from);
lockdep_is_held(&rt6_exception_lock));
if (!from || if (!from ||
!(rt->rt6i_flags & RTF_CACHE)) !(rt->rt6i_flags & RTF_CACHE))
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment