=============================
WARNING: suspicious RCU usage
5.16.0-rc4-next-20211210-syzkaller #0 Not tainted
-----------------------------
kernel/sched/core.c:9545 Illegal context switch in RCU-bh read-side critical section!
other info that might help us debug this:
rcu_scheduler_active = 2, debug_locks = 1
4 locks held by syz-executor.1/5111:
#0: ffffffff8bb818a0 (rcu_read_lock){....}-{1:2}, at: tun_get_user+0x1940/0x3940 drivers/net/tun.c:1866
#1: ffffffff8bb818a0 (rcu_read_lock){....}-{1:2}, at: arch_static_branch arch/x86/include/asm/jump_label.h:27 [inline]
#1: ffffffff8bb818a0 (rcu_read_lock){....}-{1:2}, at: netif_receive_skb_internal net/core/dev.c:5528 [inline]
#1: ffffffff8bb818a0 (rcu_read_lock){....}-{1:2}, at: netif_receive_skb+0xda/0x8e0 net/core/dev.c:5605
#2: ffffffff8bb818a0 (rcu_read_lock){....}-{1:2}, at: ip6_pol_route+0x156/0x11e0 net/ipv6/route.c:2217
#3: ffffffff8bb81840 (rcu_read_lock_bh){....}-{1:2}, at: rt6_probe net/ipv6/route.c:632 [inline]
#3: ffffffff8bb81840 (rcu_read_lock_bh){....}-{1:2}, at: find_match.part.0+0x35a/0xd00 net/ipv6/route.c:752
stack backtrace:
CPU: 0 PID: 5111 Comm: syz-executor.1 Not tainted 5.16.0-rc4-next-20211210-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
__might_resched+0x235/0x2c0 kernel/sched/core.c:9545
might_alloc include/linux/sched/mm.h:256 [inline]
slab_pre_alloc_hook mm/slab.h:739 [inline]
slab_alloc_node mm/slub.c:3145 [inline]
slab_alloc mm/slub.c:3239 [inline]
kmem_cache_alloc_trace+0x25d/0x2c0 mm/slub.c:3256
kmalloc include/linux/slab.h:581 [inline]
kzalloc include/linux/slab.h:715 [inline]
ref_tracker_alloc+0xe1/0x430 lib/ref_tracker.c:74
netdev_tracker_alloc include/linux/netdevice.h:3860 [inline]
dev_hold_track include/linux/netdevice.h:3877 [inline]
rt6_probe net/ipv6/route.c:661 [inline]
find_match.part.0+0xac9/0xd00 net/ipv6/route.c:752
find_match net/ipv6/route.c:825 [inline]
__find_rr_leaf+0x17f/0xd20 net/ipv6/route.c:826
find_rr_leaf net/ipv6/route.c:847 [inline]
rt6_select net/ipv6/route.c:891 [inline]
fib6_table_lookup+0x649/0xa20 net/ipv6/route.c:2185
ip6_pol_route+0x1c5/0x11e0 net/ipv6/route.c:2221
pol_lookup_func include/net/ip6_fib.h:580 [inline]
fib6_rule_lookup+0x52a/0x6f0 net/ipv6/fib6_rules.c:120
ip6_route_input_lookup net/ipv6/route.c:2291 [inline]
ip6_route_input+0x63c/0xbc0 net/ipv6/route.c:2587
ip6_rcv_finish_core.constprop.0.isra.0+0x168/0x570 net/ipv6/ip6_input.c:63
ip6_rcv_finish net/ipv6/ip6_input.c:74 [inline]
NF_HOOK include/linux/netfilter.h:307 [inline]
NF_HOOK include/linux/netfilter.h:301 [inline]
ipv6_rcv+0x21c/0x3b0 net/ipv6/ip6_input.c:297
__netif_receive_skb_one_core+0x114/0x180 net/core/dev.c:5346
__netif_receive_skb+0x24/0x1b0 net/core/dev.c:5460
netif_receive_skb_internal net/core/dev.c:5546 [inline]
netif_receive_skb+0x13e/0x8e0 net/core/dev.c:5605
tun_rx_batched.isra.0+0x460/0x720 drivers/net/tun.c:1465
tun_get_user+0x2625/0x3940 drivers/net/tun.c:1912
tun_chr_write_iter+0xdd/0x1a0 drivers/net/tun.c:1942
call_write_iter include/linux/fs.h:2079 [inline]
new_sync_write+0x429/0x660 fs/read_write.c:503
vfs_write+0x7cd/0xae0 fs/read_write.c:590
ksys_write+0x12d/0x250 fs/read_write.c:643
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fd618fb69af
Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 99 fd ff ff 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 cc fd ff ff 48
RSP: 002b:00007fd617979130 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fd619116f60 RCX: 00007fd618fb69af
RDX: 00000000000000e1 RSI: 0000000020000400 RDI: 00000000000000c8
RBP: 00007fd61905dff1 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000000000e1 R11: 0000000000000293 R12: 0000000000000000
R13: 00007ffeebf23fbf R14: 00007fd617979300 R15: 0000000000022000
BUG: sleeping function called from invalid context at include/linux/sched/mm.h:256
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 5111, name: syz-executor.1
preempt_count: 400, expected: 0
RCU nest depth: 3, expected: 0
4 locks held by syz-executor.1/5111:
#0:
ffffffff8bb818a0
(
rcu_read_lock
){....}-{1:2}
, at: tun_get_user+0x1940/0x3940 drivers/net/tun.c:1866
#1:
ffffffff8bb818a0
(
rcu_read_lock
){....}-{1:2}
, at: arch_static_branch arch/x86/include/asm/jump_label.h:27 [inline]
, at: netif_receive_skb_internal net/core/dev.c:5528 [inline]
, at: netif_receive_skb+0xda/0x8e0 net/core/dev.c:5605
#2:
ffffffff8bb818a0
(
rcu_read_lock
){....}-{1:2}
, at: ip6_pol_route+0x156/0x11e0 net/ipv6/route.c:2217
#3:
ffffffff8bb81840
(
rcu_read_lock_bh
){....}-{1:2}, at: rt6_probe net/ipv6/route.c:632 [inline]
){....}-{1:2}, at: find_match.part.0+0x35a/0xd00 net/ipv6/route.c:752
Preemption disabled at:
[] local_bh_disable include/linux/bottom_half.h:20 [inline]
[] tun_rx_batched.isra.0+0x3eb/0x720 drivers/net/tun.c:1463
CPU: 0 PID: 5111 Comm: syz-executor.1 Not tainted 5.16.0-rc4-next-20211210-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
__might_resched.cold+0x222/0x26b kernel/sched/core.c:9583
might_alloc include/linux/sched/mm.h:256 [inline]
slab_pre_alloc_hook mm/slab.h:739 [inline]
slab_alloc_node mm/slub.c:3145 [inline]
slab_alloc mm/slub.c:3239 [inline]
kmem_cache_alloc_trace+0x25d/0x2c0 mm/slub.c:3256
kmalloc include/linux/slab.h:581 [inline]
kzalloc include/linux/slab.h:715 [inline]
ref_tracker_alloc+0xe1/0x430 lib/ref_tracker.c:74
netdev_tracker_alloc include/linux/netdevice.h:3860 [inline]
dev_hold_track include/linux/netdevice.h:3877 [inline]
rt6_probe net/ipv6/route.c:661 [inline]
find_match.part.0+0xac9/0xd00 net/ipv6/route.c:752
find_match net/ipv6/route.c:825 [inline]
__find_rr_leaf+0x17f/0xd20 net/ipv6/route.c:826
find_rr_leaf net/ipv6/route.c:847 [inline]
rt6_select net/ipv6/route.c:891 [inline]
fib6_table_lookup+0x649/0xa20 net/ipv6/route.c:2185
ip6_pol_route+0x1c5/0x11e0 net/ipv6/route.c:2221
pol_lookup_func include/net/ip6_fib.h:580 [inline]
fib6_rule_lookup+0x52a/0x6f0 net/ipv6/fib6_rules.c:120
ip6_route_input_lookup net/ipv6/route.c:2291 [inline]
ip6_route_input+0x63c/0xbc0 net/ipv6/route.c:2587
ip6_rcv_finish_core.constprop.0.isra.0+0x168/0x570 net/ipv6/ip6_input.c:63
ip6_rcv_finish net/ipv6/ip6_input.c:74 [inline]
NF_HOOK include/linux/netfilter.h:307 [inline]
NF_HOOK include/linux/netfilter.h:301 [inline]
ipv6_rcv+0x21c/0x3b0 net/ipv6/ip6_input.c:297
__netif_receive_skb_one_core+0x114/0x180 net/core/dev.c:5346
__netif_receive_skb+0x24/0x1b0 net/core/dev.c:5460
netif_receive_skb_internal net/core/dev.c:5546 [inline]
netif_receive_skb+0x13e/0x8e0 net/core/dev.c:5605
tun_rx_batched.isra.0+0x460/0x720 drivers/net/tun.c:1465
tun_get_user+0x2625/0x3940 drivers/net/tun.c:1912
tun_chr_write_iter+0xdd/0x1a0 drivers/net/tun.c:1942
call_write_iter include/linux/fs.h:2079 [inline]
new_sync_write+0x429/0x660 fs/read_write.c:503
vfs_write+0x7cd/0xae0 fs/read_write.c:590
ksys_write+0x12d/0x250 fs/read_write.c:643
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fd618fb69af
Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 99 fd ff ff 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 cc fd ff ff 48
RSP: 002b:00007fd617979130 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fd619116f60 RCX: 00007fd618fb69af
RDX: 00000000000000e1 RSI: 0000000020000400 RDI: 00000000000000c8
RBP: 00007fd61905dff1 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000000000e1 R11: 0000000000000293 R12: 0000000000000000
R13: 00007ffeebf23fbf R14: 00007fd617979300 R15: 0000000000022000