* [PATCH net] ipv6: Fix unbalanced rcu locking in rt6_update_exception_stamp_rt
@ 2019-08-01 21:36 David Ahern
2019-08-05 20:17 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: David Ahern @ 2019-08-01 21:36 UTC (permalink / raw)
To: davem; +Cc: netdev, David Ahern
From: David Ahern <dsahern@gmail.com>
The nexthop path in rt6_update_exception_stamp_rt needs to call
rcu_read_unlock if it fails to find a fib6_nh match rather than
just returning.
Fixes: e659ba31d806 ("ipv6: Handle all fib6_nh in a nexthop in exception handling")
Signed-off-by: David Ahern <dsahern@gmail.com>
---
net/ipv6/route.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index e49fec767a10..fd059e08785a 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1951,7 +1951,7 @@ static void rt6_update_exception_stamp_rt(struct rt6_info *rt)
nexthop_for_each_fib6_nh(from->nh, fib6_nh_find_match, &arg);
if (!arg.match)
- return;
+ goto unlock;
fib6_nh = arg.match;
} else {
fib6_nh = from->fib6_nh;
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] ipv6: Fix unbalanced rcu locking in rt6_update_exception_stamp_rt
2019-08-01 21:36 [PATCH net] ipv6: Fix unbalanced rcu locking in rt6_update_exception_stamp_rt David Ahern
@ 2019-08-05 20:17 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-08-05 20:17 UTC (permalink / raw)
To: dsahern; +Cc: netdev, dsahern
From: David Ahern <dsahern@kernel.org>
Date: Thu, 1 Aug 2019 14:36:35 -0700
> From: David Ahern <dsahern@gmail.com>
>
> The nexthop path in rt6_update_exception_stamp_rt needs to call
> rcu_read_unlock if it fails to find a fib6_nh match rather than
> just returning.
>
> Fixes: e659ba31d806 ("ipv6: Handle all fib6_nh in a nexthop in exception handling")
> Signed-off-by: David Ahern <dsahern@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-08-05 20:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-01 21:36 [PATCH net] ipv6: Fix unbalanced rcu locking in rt6_update_exception_stamp_rt David Ahern
2019-08-05 20:17 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).