bisecting fixing commit since c7d102232649226a69dddd58a4942cf13cff4f7c building syzkaller on 6c236867ce33c0c16b102e02a08226d7eb9b2046 testing commit c7d102232649226a69dddd58a4942cf13cff4f7c compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: c3f6977105f7c29f5fb65535ae788ae873dc8371e11da84610fb0ae138f29da4 run #0: basic kernel testing failed: BUG: sleeping function called from invalid context in lock_sock_nested run #1: crashed: INFO: task hung in synchronize_rcu run #2: crashed: INFO: task hung in synchronize_rcu run #3: crashed: INFO: task hung in synchronize_rcu run #4: crashed: INFO: task hung in synchronize_rcu run #5: crashed: INFO: task hung in synchronize_rcu run #6: crashed: INFO: task hung in synchronize_rcu run #7: crashed: INFO: task hung in synchronize_rcu run #8: crashed: INFO: task hung in synchronize_rcu run #9: crashed: INFO: task hung in synchronize_rcu run #10: crashed: INFO: task hung in synchronize_rcu run #11: crashed: INFO: task hung in synchronize_rcu run #12: crashed: INFO: task hung in synchronize_rcu run #13: crashed: INFO: task hung in synchronize_rcu run #14: crashed: INFO: task hung in synchronize_rcu run #15: crashed: INFO: task hung in synchronize_rcu run #16: crashed: INFO: task hung in synchronize_rcu run #17: crashed: INFO: task hung in __lru_add_drain_all run #18: crashed: INFO: task hung in synchronize_rcu run #19: crashed: INFO: task hung in synchronize_rcu testing current HEAD ab84db251c04d38b8dc7ee86e13d4050bedb1c88 testing commit ab84db251c04d38b8dc7ee86e13d4050bedb1c88 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 755fe23db12d94d39eec1ee17180ef9cf9734a91b6bb9335afeee06f731fffb2 run #0: crashed: INFO: rcu detected stall in corrupted run #1: crashed: INFO: rcu detected stall in corrupted run #2: crashed: INFO: rcu detected stall in corrupted run #3: crashed: INFO: rcu detected stall in corrupted run #4: crashed: INFO: rcu detected stall in corrupted run #5: crashed: INFO: rcu detected stall in corrupted run #6: crashed: INFO: rcu detected stall in corrupted run #7: crashed: INFO: rcu detected stall in corrupted run #8: crashed: INFO: rcu detected stall in corrupted run #9: crashed: INFO: task hung in synchronize_rcu revisions tested: 2, total time: 31m0.168237411s (build: 13m53.252637011s, test: 16m8.576109188s) the crash still happens on HEAD commit msg: net: bonding: fix possible NULL deref in rlb code crash: INFO: task hung in synchronize_rcu INFO: task kworker/u4:2:42 blocked for more than 143 seconds. Not tainted 5.19.0-rc3-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:kworker/u4:2 state:D stack:26576 pid: 42 ppid: 2 flags:0x00004000 Workqueue: events_unbound fsnotify_connector_destroy_workfn Call Trace: context_switch kernel/sched/core.c:5146 [inline] __schedule+0x916/0x2700 kernel/sched/core.c:6458 schedule+0xd2/0x1f0 kernel/sched/core.c:6530 schedule_timeout+0x19d/0x250 kernel/time/timer.c:1911 do_wait_for_common kernel/sched/completion.c:85 [inline] __wait_for_common+0x378/0x530 kernel/sched/completion.c:106 __synchronize_srcu+0x1f2/0x290 kernel/rcu/srcutree.c:1170 fsnotify_connector_destroy_workfn+0x4a/0xa0 fs/notify/mark.c:208 process_one_work+0x865/0x13d0 kernel/workqueue.c:2289 process_scheduled_works kernel/workqueue.c:2352 [inline] worker_thread+0x738/0xec0 kernel/workqueue.c:2438 kthread+0x299/0x340 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:302 INFO: task kworker/u4:6:1281 blocked for more than 143 seconds. Not tainted 5.19.0-rc3-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:kworker/u4:6 state:D stack:25432 pid: 1281 ppid: 2 flags:0x00004000 Workqueue: events_unbound fsnotify_mark_destroy_workfn Call Trace: context_switch kernel/sched/core.c:5146 [inline] __schedule+0x916/0x2700 kernel/sched/core.c:6458 schedule+0xd2/0x1f0 kernel/sched/core.c:6530 schedule_timeout+0x19d/0x250 kernel/time/timer.c:1911 do_wait_for_common kernel/sched/completion.c:85 [inline] __wait_for_common+0x378/0x530 kernel/sched/completion.c:106 __synchronize_srcu+0x1f2/0x290 kernel/rcu/srcutree.c:1170 fsnotify_mark_destroy_workfn+0xeb/0x3b0 fs/notify/mark.c:898 process_one_work+0x865/0x13d0 kernel/workqueue.c:2289 process_scheduled_works kernel/workqueue.c:2352 [inline] worker_thread+0x738/0xec0 kernel/workqueue.c:2438 kthread+0x299/0x340 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:302 Showing all locks held in the system: 3 locks held by kworker/0:0/6: 1 lock held by khungtaskd/29: #0: ffffffff8af7afe0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x260 kernel/locking/lockdep.c:6491 1 lock held by khugepaged/35: #0: ffffffff8b061ec8 (lock#5){+.+.}-{3:3}, at: __lru_add_drain_all+0x57/0x6d0 mm/swap.c:790 2 locks held by kworker/u4:2/42: #0: ffff888010069138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: ffff888010069138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: arch_atomic_long_set include/linux/atomic/atomic-long.h:41 [inline] #0: ffff888010069138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:1280 [inline] #0: ffff888010069138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:636 [inline] #0: ffff888010069138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:663 [inline] #0: ffff888010069138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x78a/0x13d0 kernel/workqueue.c:2260 #1: ffffc90000b37db8 (connector_reaper_work){+.+.}-{0:0}, at: process_one_work+0x7b7/0x13d0 kernel/workqueue.c:2264 2 locks held by kworker/u4:6/1281: #0: ffff888010069138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: ffff888010069138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: arch_atomic_long_set include/linux/atomic/atomic-long.h:41 [inline] #0: ffff888010069138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:1280 [inline] #0: ffff888010069138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:636 [inline] #0: ffff888010069138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:663 [inline] #0: ffff888010069138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x78a/0x13d0 kernel/workqueue.c:2260 #1: ffffc90005d97db8 ((reaper_work).work){+.+.}-{0:0}, at: process_one_work+0x7b7/0x13d0 kernel/workqueue.c:2264 2 locks held by getty/3320: #0: ffff88802529d098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x1f/0x70 drivers/tty/tty_ldisc.c:244 #1: ffffc900029162e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0xb14/0x1040 drivers/tty/n_tty.c:2124 2 locks held by dhcpcd/9024: #0: ffff888079372130 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1677 [inline] #0: ffff888079372130 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: packet_do_bind+0x27/0xad0 net/packet/af_packet.c:3194 #1: ffffffff8af852e0 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:290 [inline] #1: ffffffff8af852e0 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x4f8/0x610 kernel/rcu/tree_exp.h:927 2 locks held by dhcpcd/9065: #0: ffff8880799f2130 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1677 [inline] #0: ffff8880799f2130 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: packet_do_bind+0x27/0xad0 net/packet/af_packet.c:3194 #1: ffffffff8af852e0 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:322 [inline] #1: ffffffff8af852e0 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x2d3/0x610 kernel/rcu/tree_exp.h:927 1 lock held by dhcpcd/9082: #0: ffff88806289c130 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1677 [inline] #0: ffff88806289c130 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: packet_do_bind+0x27/0xad0 net/packet/af_packet.c:3194 1 lock held by dhcpcd/9095: #0: ffff88805e96a130 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1677 [inline] #0: ffff88805e96a130 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: packet_do_bind+0x27/0xad0 net/packet/af_packet.c:3194 1 lock held by dhcpcd/9106: #0: ffff88801ad96130 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1677 [inline] #0: ffff88801ad96130 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: packet_do_bind+0x27/0xad0 net/packet/af_packet.c:3194 1 lock held by dhcpcd/9133: #0: ffff888062d42130 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1677 [inline] #0: ffff888062d42130 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: packet_do_bind+0x27/0xad0 net/packet/af_packet.c:3194 1 lock held by dhcpcd/9742: #0: ffff88805f542130 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1677 [inline] #0: ffff88805f542130 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: packet_do_bind+0x27/0xad0 net/packet/af_packet.c:3194 1 lock held by dhcpcd/9753: #0: ffff88805d744130 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1677 [inline] #0: ffff88805d744130 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: packet_do_bind+0x27/0xad0 net/packet/af_packet.c:3194 1 lock held by dhcpcd/9824: #0: ffff88801c3e8130 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1677 [inline] #0: ffff88801c3e8130 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: packet_do_bind+0x27/0xad0 net/packet/af_packet.c:3194 1 lock held by dhcpcd/9849: #0: ffff88805ee26130 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1677 [inline] #0: ffff88805ee26130 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: packet_do_bind+0x27/0xad0 net/packet/af_packet.c:3194 ============================================= NMI backtrace for cpu 1 CPU: 1 PID: 29 Comm: khungtaskd Not tainted 5.19.0-rc3-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+0x57/0x7d lib/dump_stack.c:106 nmi_cpu_backtrace.cold+0x30/0xc0 lib/nmi_backtrace.c:111 nmi_trigger_cpumask_backtrace+0x140/0x170 lib/nmi_backtrace.c:62 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline] check_hung_uninterruptible_tasks kernel/hung_task.c:220 [inline] watchdog+0x891/0xc20 kernel/hung_task.c:378 kthread+0x299/0x340 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:302 Sending NMI from CPU 1 to CPUs 0: NMI backtrace for cpu 0 CPU: 0 PID: 15 Comm: ksoftirqd/0 Not tainted 5.19.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:rt6_score_route+0x60/0x2d0 net/ipv6/route.c:717 Code: 49 8d bc 24 d8 00 00 00 49 89 f8 49 c1 e8 03 41 0f b6 04 00 84 c0 74 08 3c 03 0f 8e 8b 01 00 00 41 39 94 24 d8 00 00 00 74 0d c1 01 0f 85 45 02 00 00 31 c0 eb 05 b8 02 00 00 00 41 89 f4 41 RSP: 0018:ffffc900001474a8 EFLAGS: 00000283 RAX: 0000000000000000 RBX: ffff8880620804a8 RCX: 0000000000000003 RDX: 0000000000000dda RSI: 0000000000000001 RDI: ffff8880621880d8 RBP: ffffc90000147550 R08: 1ffff1100c43101b R09: ffffc90000147730 R10: ffff88801b026400 R11: 0000000000000001 R12: ffff888062188000 R13: 0000000000000001 R14: ffffc90000147740 R15: ffff8880651d0000 FS: 0000000000000000(0000) GS:ffff8880b9e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000052f7b0 CR3: 000000000ac8e000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: find_match.part.0+0xf3/0xb20 net/ipv6/route.c:746 find_match net/ipv6/route.c:828 [inline] __find_rr_leaf+0x14f/0xa40 net/ipv6/route.c:829 find_rr_leaf net/ipv6/route.c:850 [inline] rt6_select net/ipv6/route.c:894 [inline] fib6_table_lookup+0x44d/0x7e0 net/ipv6/route.c:2182 ip6_pol_route+0x17d/0xdc0 net/ipv6/route.c:2218 pol_lookup_func include/net/ip6_fib.h:582 [inline] fib6_rule_lookup+0xfb/0x630 net/ipv6/fib6_rules.c:116 ip6_route_input_lookup net/ipv6/route.c:2287 [inline] ip6_route_input+0x547/0x9e0 net/ipv6/route.c:2583 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+0x1b6/0x320 net/ipv6/ip6_input.c:306 __netif_receive_skb_one_core+0x104/0x180 net/core/dev.c:5480 process_backlog+0x2e4/0x6d0 net/core/dev.c:5922 __napi_poll+0x96/0x510 net/core/dev.c:6488 napi_poll net/core/dev.c:6555 [inline] net_rx_action+0x886/0xc70 net/core/dev.c:6666 __do_softirq+0x29b/0x9c2 kernel/softirq.c:571 run_ksoftirqd kernel/softirq.c:934 [inline] run_ksoftirqd+0x2d/0x60 kernel/softirq.c:926 smpboot_thread_fn+0x548/0x8c0 kernel/smpboot.c:164 kthread+0x299/0x340 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:302 ---------------- Code disassembly (best guess): 0: 49 8d bc 24 d8 00 00 lea 0xd8(%r12),%rdi 7: 00 8: 49 89 f8 mov %rdi,%r8 b: 49 c1 e8 03 shr $0x3,%r8 f: 41 0f b6 04 00 movzbl (%r8,%rax,1),%eax 14: 84 c0 test %al,%al 16: 74 08 je 0x20 18: 3c 03 cmp $0x3,%al 1a: 0f 8e 8b 01 00 00 jle 0x1ab 20: 41 39 94 24 d8 00 00 cmp %edx,0xd8(%r12) 27: 00 28: 74 0d je 0x37 * 2a: f6 c1 01 test $0x1,%cl <-- trapping instruction 2d: 0f 85 45 02 00 00 jne 0x278 33: 31 c0 xor %eax,%eax 35: eb 05 jmp 0x3c 37: b8 02 00 00 00 mov $0x2,%eax 3c: 41 89 f4 mov %esi,%r12d 3f: 41 rex.B