All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net/ipv6: fix LOCKDEP issue in rt6_remove_exception_rt()
@ 2018-04-24 16:22 Eric Dumazet
  2018-04-24 16:25 ` David Ahern
  2018-04-24 20:19 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Dumazet @ 2018-04-24 16:22 UTC (permalink / raw)
  To: David S . Miller; +Cc: netdev, Eric Dumazet, Eric Dumazet, David Ahern

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 <edumazet@google.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Cc: David Ahern <dsahern@gmail.com>
---
 net/ipv6/route.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index ac3e51631c659b5c5c8a93c17011cb7f3ad266e2..432c4bcc1111085671f32987e4673e47898085a3 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -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;
-- 
2.17.0.484.g0c8726318c-goog

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net/ipv6: fix LOCKDEP issue in rt6_remove_exception_rt()
  2018-04-24 16:22 [PATCH net-next] net/ipv6: fix LOCKDEP issue in rt6_remove_exception_rt() Eric Dumazet
@ 2018-04-24 16:25 ` David Ahern
  2018-04-24 20:19 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Ahern @ 2018-04-24 16:25 UTC (permalink / raw)
  To: Eric Dumazet, David S . Miller; +Cc: netdev, Eric Dumazet

On 4/24/18 10:22 AM, Eric Dumazet wrote:
> 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 <edumazet@google.com>
> Reported-by: syzbot <syzkaller@googlegroups.com>
> Cc: David Ahern <dsahern@gmail.com>
> ---
>  net/ipv6/route.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
>

Acked-by: David Ahern <dsahern@gmail.com>

Thanks, Eric.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net/ipv6: fix LOCKDEP issue in rt6_remove_exception_rt()
  2018-04-24 16:22 [PATCH net-next] net/ipv6: fix LOCKDEP issue in rt6_remove_exception_rt() Eric Dumazet
  2018-04-24 16:25 ` David Ahern
@ 2018-04-24 20:19 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-04-24 20:19 UTC (permalink / raw)
  To: edumazet; +Cc: netdev, eric.dumazet, dsahern

From: Eric Dumazet <edumazet@google.com>
Date: Tue, 24 Apr 2018 09:22:49 -0700

> 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 <edumazet@google.com>
> Reported-by: syzbot <syzkaller@googlegroups.com>

Applied, thanks Eric.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-24 20:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-24 16:22 [PATCH net-next] net/ipv6: fix LOCKDEP issue in rt6_remove_exception_rt() Eric Dumazet
2018-04-24 16:25 ` David Ahern
2018-04-24 20:19 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.