bisecting fixing commit since c0842fbc1b18c7a044e6ff3e8fa78bfa822c7d1a building syzkaller on 80a0690249dc4dbbbed95ba197192b99c73694c5 testing commit c0842fbc1b18c7a044e6ff3e8fa78bfa822c7d1a with gcc (GCC) 8.1.0 kernel signature: f53315c6e9cee3423c9b12a483e88657a492b1506b9503df1a97622046498d14 run #0: crashed: BUG: sleeping function called from invalid context in exc_page_fault run #1: crashed: BUG: sleeping function called from invalid context in exc_page_fault run #2: crashed: WARNING: ODEBUG bug in bt_host_release run #3: crashed: WARNING: ODEBUG bug in bt_host_release run #4: crashed: BUG: sleeping function called from invalid context in exc_page_fault run #5: OK run #6: crashed: WARNING in __queue_work run #7: OK run #8: OK run #9: OK testing current HEAD b5fc7a89e58bcc059a3d5e4db79c481fb437de59 testing commit b5fc7a89e58bcc059a3d5e4db79c481fb437de59 with gcc (GCC) 8.1.0 kernel signature: b4086ad5fa2c34cc6b94e29a439e8d794166f26d2cb2662cff784bf4e493784c run #0: crashed: BUG: sleeping function called from invalid context in exc_page_fault run #1: crashed: WARNING: ODEBUG bug in bt_host_release run #2: crashed: WARNING in __queue_work run #3: crashed: WARNING: ODEBUG bug in bt_host_release run #4: crashed: WARNING: ODEBUG bug in bt_host_release run #5: crashed: WARNING: ODEBUG bug in netdev_run_todo run #6: OK run #7: crashed: BUG: sleeping function called from invalid context in exc_page_fault run #8: OK run #9: OK revisions tested: 2, total time: 30m0.685170213s (build: 10m6.582172274s, test: 19m24.991077479s) the crash still happens on HEAD commit msg: Merge tag 'overflow-v5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux crash: BUG: sleeping function called from invalid context in exc_page_fault BUG: sleeping function called from invalid context at arch/x86/mm/fault.c:1330 in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 29066, name: syz-executor.3 3 locks held by syz-executor.3/29066: #0: ffff88811c8dcf40 (&hdev->req_lock){+.+.}-{3:3}, at: hci_req_sync+0x35/0x70 net/bluetooth/hci_request.c:278 #1: ffffffff843d7520 (rcu_read_lock){....}-{1:2}, at: __queue_work+0x54/0x670 kernel/workqueue.c:1412 #2: ffff88812b1bb468 (&mm->mmap_lock#2){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:56 [inline] #2: ffff88812b1bb468 (&mm->mmap_lock#2){++++}-{3:3}, at: do_user_addr_fault arch/x86/mm/fault.c:1313 [inline] #2: ffff88812b1bb468 (&mm->mmap_lock#2){++++}-{3:3}, at: handle_page_fault arch/x86/mm/fault.c:1429 [inline] #2: ffff88812b1bb468 (&mm->mmap_lock#2){++++}-{3:3}, at: exc_page_fault+0x156/0x700 arch/x86/mm/fault.c:1482 irq event stamp: 58 hardirqs last enabled at (57): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] hardirqs last enabled at (57): [] _raw_spin_unlock_irqrestore+0x54/0x70 kernel/locking/spinlock.c:191 hardirqs last disabled at (58): [] queue_work_on+0x82/0xb0 kernel/workqueue.c:1515 softirqs last enabled at (44): [] hci_sock_ioctl+0x51/0x3e0 net/bluetooth/hci_sock.c:1010 softirqs last disabled at (42): [] spin_lock_bh include/linux/spinlock.h:359 [inline] softirqs last disabled at (42): [] release_sock+0x14/0xa0 net/core/sock.c:3063 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 0 PID: 29066 Comm: syz-executor.3 Not tainted 5.9.0-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+0xa3/0xc8 lib/dump_stack.c:118 ___might_sleep.cold.112+0xfb/0x10f kernel/sched/core.c:7298 do_user_addr_fault arch/x86/mm/fault.c:1330 [inline] handle_page_fault arch/x86/mm/fault.c:1429 [inline] exc_page_fault+0x171/0x700 arch/x86/mm/fault.c:1482 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:538 RIP: 0010:__queue_work+0xdc/0x670 kernel/workqueue.c:1434 Code: 88 03 00 00 44 89 ef e8 52 4b f1 ff 4c 89 e7 89 c6 e8 98 d3 ff ff 48 89 df 49 89 c7 e8 fd dd ff ff 48 85 c0 0f 84 2f 01 00 00 <49> 39 07 0f 85 75 02 00 00 48 89 c7 e8 d3 de e9 01 41 8b 47 18 85 RSP: 0018:ffffc900013c7c08 EFLAGS: 00010086 RAX: ffff88812acd9000 RBX: ffff88811c8dca80 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000005 RDI: ffffffff842edbe0 RBP: ffffc900013c7c40 R08: ffff88812b800050 R09: ffff88812b800000 R10: 0000000000000000 R11: ffffffff842edc28 R12: ffff8881117e3c00 R13: 0000000000000000 R14: 0000000000000040 R15: 0000000000000000 queue_work_on+0x99/0xb0 kernel/workqueue.c:1518 queue_work include/linux/workqueue.h:507 [inline] req_run+0xa9/0xf0 net/bluetooth/hci_request.c:87 hci_req_run_skb net/bluetooth/hci_request.c:99 [inline] __hci_req_sync+0xd9/0x280 net/bluetooth/hci_request.c:212 hci_req_sync+0x49/0x70 net/bluetooth/hci_request.c:279 hci_dev_cmd+0x1b2/0x2c0 net/bluetooth/hci_core.c:2020 hci_sock_ioctl+0x1f6/0x3e0 net/bluetooth/hci_sock.c:1052 sock_do_ioctl+0x38/0x130 net/socket.c:1047 sock_ioctl+0x2f2/0x3e0 net/socket.c:1198 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x7c/0xb0 fs/ioctl.c:739 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45cce9 Code: 2d b6 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 fb b5 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f3dbd6dec78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000001d300 RCX: 000000000045cce9 RDX: 0000000020000000 RSI: 00000000400448de RDI: 0000000000000004 RBP: 000000000078c080 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000078c04c R13: 00007ffd4712ec6f R14: 00007f3dbd6df9c0 R15: 000000000078c04c BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 121465067 P4D 121465067 PUD 110284067 PMD 0 Oops: 0000 [#1] PREEMPT SMP CPU: 0 PID: 29066 Comm: syz-executor.3 Tainted: G W 5.9.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__queue_work+0xdc/0x670 kernel/workqueue.c:1434 Code: 88 03 00 00 44 89 ef e8 52 4b f1 ff 4c 89 e7 89 c6 e8 98 d3 ff ff 48 89 df 49 89 c7 e8 fd dd ff ff 48 85 c0 0f 84 2f 01 00 00 <49> 39 07 0f 85 75 02 00 00 48 89 c7 e8 d3 de e9 01 41 8b 47 18 85 RSP: 0018:ffffc900013c7c08 EFLAGS: 00010086 RAX: ffff88812acd9000 RBX: ffff88811c8dca80 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000005 RDI: ffffffff842edbe0 RBP: ffffc900013c7c40 R08: ffff88812b800050 R09: ffff88812b800000 R10: 0000000000000000 R11: ffffffff842edc28 R12: ffff8881117e3c00 R13: 0000000000000000 R14: 0000000000000040 R15: 0000000000000000 FS: 00007f3dbd6df700(0000) GS:ffff88812c000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000011013f000 CR4: 00000000001506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: queue_work_on+0x99/0xb0 kernel/workqueue.c:1518 queue_work include/linux/workqueue.h:507 [inline] req_run+0xa9/0xf0 net/bluetooth/hci_request.c:87 hci_req_run_skb net/bluetooth/hci_request.c:99 [inline] __hci_req_sync+0xd9/0x280 net/bluetooth/hci_request.c:212 hci_req_sync+0x49/0x70 net/bluetooth/hci_request.c:279 hci_dev_cmd+0x1b2/0x2c0 net/bluetooth/hci_core.c:2020 hci_sock_ioctl+0x1f6/0x3e0 net/bluetooth/hci_sock.c:1052 sock_do_ioctl+0x38/0x130 net/socket.c:1047 sock_ioctl+0x2f2/0x3e0 net/socket.c:1198 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x7c/0xb0 fs/ioctl.c:739 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45cce9 Code: 2d b6 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 fb b5 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f3dbd6dec78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000001d300 RCX: 000000000045cce9 RDX: 0000000020000000 RSI: 00000000400448de RDI: 0000000000000004 RBP: 000000000078c080 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000078c04c R13: 00007ffd4712ec6f R14: 00007f3dbd6df9c0 R15: 000000000078c04c Modules linked in: CR2: 0000000000000000 ---[ end trace b3cdfdb962da5a4a ]--- RIP: 0010:__queue_work+0xdc/0x670 kernel/workqueue.c:1434 Code: 88 03 00 00 44 89 ef e8 52 4b f1 ff 4c 89 e7 89 c6 e8 98 d3 ff ff 48 89 df 49 89 c7 e8 fd dd ff ff 48 85 c0 0f 84 2f 01 00 00 <49> 39 07 0f 85 75 02 00 00 48 89 c7 e8 d3 de e9 01 41 8b 47 18 85 RSP: 0018:ffffc900013c7c08 EFLAGS: 00010086 RAX: ffff88812acd9000 RBX: ffff88811c8dca80 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000005 RDI: ffffffff842edbe0 RBP: ffffc900013c7c40 R08: ffff88812b800050 R09: ffff88812b800000 R10: 0000000000000000 R11: ffffffff842edc28 R12: ffff8881117e3c00 R13: 0000000000000000 R14: 0000000000000040 R15: 0000000000000000 FS: 00007f3dbd6df700(0000) GS:ffff88812c000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000011013f000 CR4: 00000000001506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400