bisecting fixing commit since 0c88e405c97ed1828443b67891e6d4bb6e56cd4e building syzkaller on a0092f9dfdd33924abe5cf5565e4ec4748217c7b testing commit 0c88e405c97ed1828443b67891e6d4bb6e56cd4e compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: da46dcf352ea115536aa51f34777e0d4e73b71f38c9c65c67e51d4541b6c3e07 run #0: basic kernel testing failed: BUG: program execution failed: executor NUM: failed to write control pipe: write |NUM: broken pipe run #1: crashed: KASAN: wild-memory-access Write in rhashtable_free_and_destroy run #2: crashed: BUG: unable to handle kernel NULL pointer dereference in rhashtable_free_and_destroy run #3: crashed: BUG: unable to handle kernel NULL pointer dereference in rhashtable_free_and_destroy run #4: crashed: INFO: trying to register non-static key in rhashtable_free_and_destroy run #5: crashed: BUG: unable to handle kernel NULL pointer dereference in rhashtable_free_and_destroy run #6: crashed: BUG: unable to handle kernel NULL pointer dereference in rhashtable_free_and_destroy run #7: crashed: BUG: unable to handle kernel NULL pointer dereference in rhashtable_free_and_destroy run #8: crashed: BUG: unable to handle kernel NULL pointer dereference in rhashtable_free_and_destroy run #9: crashed: BUG: unable to handle kernel NULL pointer dereference in rhashtable_free_and_destroy run #10: crashed: WARNING in rhashtable_free_and_destroy run #11: crashed: BUG: unable to handle kernel NULL pointer dereference in rhashtable_free_and_destroy run #12: crashed: KASAN: wild-memory-access Write in rhashtable_free_and_destroy run #13: crashed: BUG: unable to handle kernel NULL pointer dereference in rhashtable_free_and_destroy run #14: crashed: KASAN: slab-out-of-bounds Write in rhashtable_free_and_destroy run #15: crashed: BUG: unable to handle kernel NULL pointer dereference in rhashtable_free_and_destroy run #16: crashed: general protection fault in get_work_pool_id run #17: crashed: KASAN: null-ptr-deref Write in rhashtable_free_and_destroy run #18: crashed: INFO: task hung in rtnl_lock run #19: crashed: INFO: task hung in rtnl_lock testing current HEAD 2950c9c5e0df6bd34af45a5168bbee345e95eae2 testing commit 2950c9c5e0df6bd34af45a5168bbee345e95eae2 compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: a026f683fbe639d9f6555279c7c1a3c6c6f80458d47f853e2e39a7ed76774143 all runs: crashed: BUG: unable to handle kernel NULL pointer dereference in rhashtable_free_and_destroy revisions tested: 2, total time: 29m7.84541331s (build: 19m3.803268322s, test: 9m32.366121193s) the crash still happens on HEAD commit msg: Linux 4.19.207 crash: BUG: unable to handle kernel NULL pointer dereference in rhashtable_free_and_destroy RDX: 0000000000000000 RSI: 00000000200006c0 RDI: 0000000000000003 RBP: 00007f4ba21dd1d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 00007fff89010ecf R14: 00007f4ba21dd300 R15: 0000000000022000 IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready BUG: unable to handle kernel NULL pointer dereference at 0000000000000080 PGD a9ef3067 P4D a9ef3067 PUD a9f4b067 PMD 0 Oops: 0002 [#1] PREEMPT SMP KASAN CPU: 0 PID: 14 Comm: kworker/0:1 Not tainted 4.19.207-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events cfg80211_destroy_iface_wk RIP: 0010:test_and_set_bit arch/x86/include/asm/bitops.h:209 [inline] RIP: 0010:try_to_grab_pending+0xb8/0x5f0 kernel/workqueue.c:1229 Code: 00 00 00 00 fc ff df 4c 89 e2 48 c1 ea 03 80 3c 02 00 0f 85 0f 04 00 00 4d 89 34 24 e8 31 87 26 00 45 84 ed 0f 85 54 01 00 00 48 0f ba 2b 00 72 11 31 c0 48 83 c4 10 5b 41 5c 41 5d 41 5e 41 RSP: 0018:ffff8880b59ef840 EFLAGS: 00010046 RAX: 0000000000000007 RBX: 0000000000000080 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8880b59e0bcc RBP: ffff8880b59ef878 R08: ffff8880b59e0c78 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880b59ef8b0 R13: 0000000000000000 R14: 0000000000000286 R15: 0000000000000080 FS: 0000000000000000(0000) GS:ffff8880ba200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000080 CR3: 00000000b341c000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __cancel_work_timer+0x9b/0x430 kernel/workqueue.c:2972 cancel_work_sync+0xb/0x10 kernel/workqueue.c:3049 rhashtable_free_and_destroy+0x25/0x690 lib/rhashtable.c:1145 mesh_table_free net/mac80211/mesh_pathtbl.c:73 [inline] mesh_pathtbl_unregister+0x43/0xa0 net/mac80211/mesh_pathtbl.c:825 ieee80211_mesh_teardown_sdata+0x15/0x20 net/mac80211/mesh.c:1478 ieee80211_teardown_sdata+0x5b/0x70 net/mac80211/iface.c:1122 ieee80211_uninit+0x10/0x20 net/mac80211/iface.c:1127 rollback_registered_many+0x849/0xbe0 net/core/dev.c:8210 rollback_registered+0xdc/0x190 net/core/dev.c:8238 unregister_netdevice_queue+0x186/0x240 net/core/dev.c:9305 unregister_netdevice include/linux/netdevice.h:2615 [inline] ieee80211_if_remove+0x1db/0x2d0 net/mac80211/iface.c:1920 ieee80211_del_iface+0xd/0x20 net/mac80211/cfg.c:144 rdev_del_virtual_intf net/wireless/rdev-ops.h:57 [inline] cfg80211_destroy_ifaces+0xe3/0x540 net/wireless/core.c:317 cfg80211_destroy_iface_wk+0x19/0x30 net/wireless/core.c:329 process_one_work+0x7b9/0x15a0 kernel/workqueue.c:2153 worker_thread+0x85/0xb60 kernel/workqueue.c:2296 kthread+0x347/0x410 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Modules linked in: CR2: 0000000000000080 ---[ end trace d092321d679e0b7b ]--- RIP: 0010:test_and_set_bit arch/x86/include/asm/bitops.h:209 [inline] RIP: 0010:try_to_grab_pending+0xb8/0x5f0 kernel/workqueue.c:1229 Code: 00 00 00 00 fc ff df 4c 89 e2 48 c1 ea 03 80 3c 02 00 0f 85 0f 04 00 00 4d 89 34 24 e8 31 87 26 00 45 84 ed 0f 85 54 01 00 00 48 0f ba 2b 00 72 11 31 c0 48 83 c4 10 5b 41 5c 41 5d 41 5e 41 RSP: 0018:ffff8880b59ef840 EFLAGS: 00010046 RAX: 0000000000000007 RBX: 0000000000000080 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8880b59e0bcc RBP: ffff8880b59ef878 R08: ffff8880b59e0c78 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880b59ef8b0 R13: 0000000000000000 R14: 0000000000000286 R15: 0000000000000080 FS: 0000000000000000(0000) GS:ffff8880ba200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000080 CR3: 00000000b341c000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess), 6 bytes skipped: 0: df 4c 89 e2 fisttps -0x1e(%rcx,%rcx,4) 4: 48 c1 ea 03 shr $0x3,%rdx 8: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) c: 0f 85 0f 04 00 00 jne 0x421 12: 4d 89 34 24 mov %r14,(%r12) 16: e8 31 87 26 00 callq 0x26874c 1b: 45 84 ed test %r13b,%r13b 1e: 0f 85 54 01 00 00 jne 0x178 * 24: f0 48 0f ba 2b 00 lock btsq $0x0,(%rbx) <-- trapping instruction 2a: 72 11 jb 0x3d 2c: 31 c0 xor %eax,%eax 2e: 48 83 c4 10 add $0x10,%rsp 32: 5b pop %rbx 33: 41 5c pop %r12 35: 41 5d pop %r13 37: 41 5e pop %r14 39: 41 rex.B