bisecting fixing commit since a5aa80588fcd5520ece36121c41b7d8e72245e33 building syzkaller on 55bf892687311014d42ea1be71517156219e7d9b testing commit a5aa80588fcd5520ece36121c41b7d8e72245e33 with gcc (GCC) 8.1.0 kernel signature: d4452c118c189917b96d239c5e638e9e27d805f6 all runs: crashed: BUG: sleeping function called from invalid context in __do_page_fault testing current HEAD 174651bdf802a2139065e8e31ce950e2f3fc4a94 testing commit 174651bdf802a2139065e8e31ce950e2f3fc4a94 with gcc (GCC) 8.1.0 kernel signature: 2ab88942c2b590cfb56abba66eed9e8d378d0bf9 run #0: crashed: BUG: sleeping function called from invalid context in __do_page_fault run #1: crashed: BUG: sleeping function called from invalid context in __do_page_fault run #2: crashed: BUG: sleeping function called from invalid context in corrupted run #3: crashed: BUG: sleeping function called from invalid context in __do_page_fault run #4: crashed: BUG: sleeping function called from invalid context in __do_page_fault run #5: crashed: BUG: sleeping function called from invalid context in __do_page_fault run #6: crashed: BUG: sleeping function called from invalid context in __do_page_fault run #7: crashed: BUG: sleeping function called from invalid context in __do_page_fault run #8: crashed: BUG: sleeping function called from invalid context in __do_page_fault run #9: crashed: BUG: sleeping function called from invalid context in __do_page_fault revisions tested: 2, total time: 24m21.182320231s (build: 16m49.93328795s, test: 6m11.783350593s) the crash still happens on HEAD commit msg: Linux 4.19.87 crash: BUG: sleeping function called from invalid context in __do_page_fault IPv6: ADDRCONF(NETDEV_UP): veth1_to_bridge: link is not ready IPv6: ADDRCONF(NETDEV_UP): veth0_to_bond: link is not ready IPv6: ADDRCONF(NETDEV_CHANGE): bridge0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_bridge: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): bridge_slave_1: link becomes ready BUG: sleeping function called from invalid context at arch/x86/mm/fault.c:1333 in_atomic(): 0, irqs_disabled(): 1, pid: 7029, name: syz-executor.1 4 locks held by syz-executor.1/7029: #0: 000000005bd9ac1b (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:362 #1: 00000000abb41780 (&tty->termios_rwsem){++++}, at: tty_unthrottle+0x1b/0xe0 drivers/tty/tty_ioctl.c:136 #2: 0000000029d6911b (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x1a/0x70 drivers/tty/tty_ldisc.c:293 #3: 0000000086d7b249 (&mm->mmap_sem){++++}, at: __do_page_fault+0x295/0xb20 arch/x86/mm/fault.c:1319 irq event stamp: 3352 hardirqs last enabled at (3351): [] do_syscall_64+0x21/0x4e0 arch/x86/entry/common.c:280 hardirqs last disabled at (3352): [] queue_work_on+0x8c/0x180 kernel/workqueue.c:1483 softirqs last enabled at (3294): [] spin_unlock_bh include/linux/spinlock.h:374 [inline] softirqs last enabled at (3294): [] net_to_rxe+0xc8/0xf0 drivers/infiniband/sw/rxe/rxe_net.c:63 softirqs last disabled at (3292): [] spin_lock_bh include/linux/spinlock.h:334 [inline] softirqs last disabled at (3292): [] net_to_rxe+0x1a/0xf0 drivers/infiniband/sw/rxe/rxe_net.c:56 CPU: 0 PID: 7029 Comm: syz-executor.1 Not tainted 4.19.87-syzkaller #0 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+0x123/0x177 lib/dump_stack.c:118 ___might_sleep.cold.88+0x1bb/0x1f4 kernel/sched/core.c:6191 __might_sleep+0x95/0x190 kernel/sched/core.c:6144 __do_page_fault+0x2b2/0xb20 arch/x86/mm/fault.c:1333 do_page_fault+0x64/0x3a7 arch/x86/mm/fault.c:1465 page_fault+0x1e/0x30 arch/x86/entry/entry_64.S:1204 RIP: 0010:test_and_set_bit arch/x86/include/asm/bitops.h:209 [inline] RIP: 0010:queue_work_on+0x8c/0x180 kernel/workqueue.c:1485 Code: 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 eb 00 00 00 48 83 3d 36 7b b2 06 00 0f 84 cd 00 00 00 fa 66 0f 1f 44 00 00 e8 a4 b3 26 00 49 0f ba 2c 24 00 41 bf 00 00 00 00 0f 83 93 00 00 00 f6 c7 02 RSP: 0018:ffff88807878f9b8 EFLAGS: 00010092 RAX: 0000000000000007 RBX: 0000000000000286 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88809a3e2884 RBP: ffff88807878f9e0 R08: ffff88809a3e2930 R09: 0000000000000002 R10: ffff88809a3e2910 R11: 0000000000000001 R12: 0000000000000050 R13: 0000000000000040 R14: ffff88812c3457c0 R15: ffff88809292b000 queue_work include/linux/workqueue.h:512 [inline] schedule_work include/linux/workqueue.h:570 [inline] slcan_write_wakeup+0x64/0x90 drivers/net/can/slcan.c:348 tty_wakeup+0xaf/0xe0 drivers/tty/tty_io.c:534 pty_unthrottle+0x32/0x50 drivers/tty/pty.c:95 tty_unthrottle+0x79/0xe0 drivers/tty/tty_ioctl.c:139 __tty_perform_flush+0x16a/0x1d0 drivers/tty/tty_ioctl.c:861 n_tty_ioctl_helper+0xb9/0x320 drivers/tty/tty_ioctl.c:937 n_tty_ioctl+0x2c/0x2d0 drivers/tty/n_tty.c:2464 tty_ioctl+0x4d0/0x1290 drivers/tty/tty_io.c:2678 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0x196/0x10c0 fs/ioctl.c:688 ksys_ioctl+0x62/0x90 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6e/0xb0 fs/ioctl.c:710 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459829 Code: fd b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f93e203bc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459829 RDX: 0000000000000000 RSI: 000000000000540b RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f93e203c6d4 R13: 00000000004c3e0b R14: 00000000004d7dd0 R15: 00000000ffffffff BUG: unable to handle kernel NULL pointer dereference at 0000000000000050 PGD 8db5f067 P4D 8db5f067 PUD 795d0067 PMD 0 Oops: 0002 [#1] PREEMPT SMP KASAN CPU: 0 PID: 7029 Comm: syz-executor.1 Tainted: G W 4.19.87-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:test_and_set_bit arch/x86/include/asm/bitops.h:209 [inline] RIP: 0010:queue_work_on+0x8c/0x180 kernel/workqueue.c:1485 Code: 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 eb 00 00 00 48 83 3d 36 7b b2 06 00 0f 84 cd 00 00 00 fa 66 0f 1f 44 00 00 e8 a4 b3 26 00 49 0f ba 2c 24 00 41 bf 00 00 00 00 0f 83 93 00 00 00 f6 c7 02 RSP: 0018:ffff88807878f9b8 EFLAGS: 00010092 RAX: 0000000000000007 RBX: 0000000000000286 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88809a3e2884 RBP: ffff88807878f9e0 R08: ffff88809a3e2930 R09: 0000000000000002 R10: ffff88809a3e2910 R11: 0000000000000001 R12: 0000000000000050 R13: 0000000000000040 R14: ffff88812c3457c0 R15: ffff88809292b000 FS: 00007f93e203c700(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000050 CR3: 000000007a36e000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: queue_work include/linux/workqueue.h:512 [inline] schedule_work include/linux/workqueue.h:570 [inline] slcan_write_wakeup+0x64/0x90 drivers/net/can/slcan.c:348 tty_wakeup+0xaf/0xe0 drivers/tty/tty_io.c:534 pty_unthrottle+0x32/0x50 drivers/tty/pty.c:95 tty_unthrottle+0x79/0xe0 drivers/tty/tty_ioctl.c:139 __tty_perform_flush+0x16a/0x1d0 drivers/tty/tty_ioctl.c:861 n_tty_ioctl_helper+0xb9/0x320 drivers/tty/tty_ioctl.c:937 n_tty_ioctl+0x2c/0x2d0 drivers/tty/n_tty.c:2464 tty_ioctl+0x4d0/0x1290 drivers/tty/tty_io.c:2678 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0x196/0x10c0 fs/ioctl.c:688 ksys_ioctl+0x62/0x90 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6e/0xb0 fs/ioctl.c:710 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459829 Code: fd b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f93e203bc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459829 RDX: 0000000000000000 RSI: 000000000000540b RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f93e203c6d4 R13: 00000000004c3e0b R14: 00000000004d7dd0 R15: 00000000ffffffff Modules linked in: CR2: 0000000000000050 ---[ end trace f1b14e930255f7dd ]--- RIP: 0010:test_and_set_bit arch/x86/include/asm/bitops.h:209 [inline] RIP: 0010:queue_work_on+0x8c/0x180 kernel/workqueue.c:1485 Code: 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 eb 00 00 00 48 83 3d 36 7b b2 06 00 0f 84 cd 00 00 00 fa 66 0f 1f 44 00 00 e8 a4 b3 26 00 49 0f ba 2c 24 00 41 bf 00 00 00 00 0f 83 93 00 00 00 f6 c7 02 RSP: 0018:ffff88807878f9b8 EFLAGS: 00010092 RAX: 0000000000000007 RBX: 0000000000000286 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88809a3e2884 RBP: ffff88807878f9e0 R08: ffff88809a3e2930 R09: 0000000000000002 R10: ffff88809a3e2910 R11: 0000000000000001 R12: 0000000000000050 R13: 0000000000000040 R14: ffff88812c3457c0 R15: ffff88809292b000 FS: 00007f93e203c700(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000050 CR3: 000000007a36e000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400