* [PATCH net] net/ipv6: fix lock imbalance in ip6_route_del()
@ 2018-05-09 17:05 Eric Dumazet
2018-05-09 17:09 ` David Ahern
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Eric Dumazet @ 2018-05-09 17:05 UTC (permalink / raw)
To: David S . Miller; +Cc: netdev, Eric Dumazet, Eric Dumazet, David Ahern
WARNING: lock held when returning to user space!
4.17.0-rc3+ #37 Not tainted
syz-executor1/27662 is leaving the kernel with locks still held!
1 lock held by syz-executor1/27662:
#0: 00000000f661aee7 (rcu_read_lock){....}, at: ip6_route_del+0xea/0x13f0 net/ipv6/route.c:3206
BUG: scheduling while atomic: syz-executor1/27662/0x00000002
INFO: lockdep is turned off.
Modules linked in:
Kernel panic - not syncing: scheduling while atomic
CPU: 1 PID: 27662 Comm: syz-executor1 Not tainted 4.17.0-rc3+ #37
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1b9/0x294 lib/dump_stack.c:113
panic+0x22f/0x4de kernel/panic.c:184
__schedule_bug.cold.85+0xdf/0xdf kernel/sched/core.c:3290
schedule_debug kernel/sched/core.c:3307 [inline]
__schedule+0x139e/0x1e30 kernel/sched/core.c:3412
schedule+0xef/0x430 kernel/sched/core.c:3549
exit_to_usermode_loop+0x220/0x310 arch/x86/entry/common.c:152
prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline]
syscall_return_slowpath arch/x86/entry/common.c:265 [inline]
do_syscall_64+0x6ac/0x800 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x455979
RSP: 002b:00007fbf4051dc68 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: 0000000000000000 RBX: 00007fbf4051e6d4 RCX: 0000000000455979
RDX: 00000000200001c0 RSI: 000000000000890c RDI: 0000000000000013
RBP: 000000000072bea0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 00000000000003c8 R14: 00000000006f9b60 R15: 0000000000000000
Dumping ftrace buffer:
(ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..
Fixes: 23fb93a4d3f1 ("net/ipv6: Cleanup exception and cache route handling")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: David Ahern <dsahern@gmail.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
---
net/ipv6/route.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index daa3662da0ee809422db12f0ff58c7975b0b8be7..af0416701fb21c71f8b0f2dec9f0ada479cb9152 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -3224,8 +3224,10 @@ static int ip6_route_del(struct fib6_config *cfg,
&cfg->fc_src);
if (rt_cache) {
rc = ip6_del_cached_rt(rt_cache, cfg);
- if (rc != -ESRCH)
+ if (rc != -ESRCH) {
+ rcu_read_unlock();
return rc;
+ }
}
continue;
}
--
2.17.0.441.gb46fe60e1d-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net] net/ipv6: fix lock imbalance in ip6_route_del()
2018-05-09 17:05 [PATCH net] net/ipv6: fix lock imbalance in ip6_route_del() Eric Dumazet
@ 2018-05-09 17:09 ` David Ahern
2018-05-09 17:10 ` Eric Dumazet
2018-05-10 21:30 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Ahern @ 2018-05-09 17:09 UTC (permalink / raw)
To: Eric Dumazet, David S . Miller; +Cc: netdev, Eric Dumazet
On 5/9/18 11:05 AM, Eric Dumazet wrote:
> WARNING: lock held when returning to user space!
> 4.17.0-rc3+ #37 Not tainted
>
> syz-executor1/27662 is leaving the kernel with locks still held!
> 1 lock held by syz-executor1/27662:
> #0: 00000000f661aee7 (rcu_read_lock){....}, at: ip6_route_del+0xea/0x13f0 net/ipv6/route.c:3206
> BUG: scheduling while atomic: syz-executor1/27662/0x00000002
> INFO: lockdep is turned off.
> Modules linked in:
> Kernel panic - not syncing: scheduling while atomic
>
> CPU: 1 PID: 27662 Comm: syz-executor1 Not tainted 4.17.0-rc3+ #37
...
>
> Fixes: 23fb93a4d3f1 ("net/ipv6: Cleanup exception and cache route handling")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: David Ahern <dsahern@gmail.com>
> Reported-by: syzbot <syzkaller@googlegroups.com>
> ---
> net/ipv6/route.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
Acked-by: David Ahern <dsahern@gmail.com>
Thanks for the fix, Eric.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] net/ipv6: fix lock imbalance in ip6_route_del()
2018-05-09 17:05 [PATCH net] net/ipv6: fix lock imbalance in ip6_route_del() Eric Dumazet
2018-05-09 17:09 ` David Ahern
@ 2018-05-09 17:10 ` Eric Dumazet
2018-05-10 21:30 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Eric Dumazet @ 2018-05-09 17:10 UTC (permalink / raw)
To: Eric Dumazet, David S . Miller; +Cc: netdev, Eric Dumazet, David Ahern
On 05/09/2018 10:05 AM, Eric Dumazet wrote:
> WARNING: lock held when returning to user space!
> 4.17.0-rc3+ #37 Not tainted
>
>
> Fixes: 23fb93a4d3f1 ("net/ipv6: Cleanup exception and cache route handling")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: David Ahern <dsahern@gmail.com>
> Reported-by: syzbot <syzkaller@googlegroups.com>
> ---
This targets net-next tree, not tree, sorry for the typo.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] net/ipv6: fix lock imbalance in ip6_route_del()
2018-05-09 17:05 [PATCH net] net/ipv6: fix lock imbalance in ip6_route_del() Eric Dumazet
2018-05-09 17:09 ` David Ahern
2018-05-09 17:10 ` Eric Dumazet
@ 2018-05-10 21:30 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-05-10 21:30 UTC (permalink / raw)
To: edumazet; +Cc: netdev, eric.dumazet, dsahern
From: Eric Dumazet <edumazet@google.com>
Date: Wed, 9 May 2018 10:05:46 -0700
> WARNING: lock held when returning to user space!
> 4.17.0-rc3+ #37 Not tainted
...
> Fixes: 23fb93a4d3f1 ("net/ipv6: Cleanup exception and cache route handling")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: David Ahern <dsahern@gmail.com>
> Reported-by: syzbot <syzkaller@googlegroups.com>
Applied to net-next.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-05-10 21:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-09 17:05 [PATCH net] net/ipv6: fix lock imbalance in ip6_route_del() Eric Dumazet
2018-05-09 17:09 ` David Ahern
2018-05-09 17:10 ` Eric Dumazet
2018-05-10 21:30 ` 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).