bisecting fixing commit since c70672d8d316ebd46ea447effadfe57ab7a30a50 building syzkaller on abf9ba4fc75d9b29af15625d44dcfc1360fad3b7 testing commit c70672d8d316ebd46ea447effadfe57ab7a30a50 with gcc (GCC) 8.1.0 kernel signature: 4aadbe0466725b80d0236b5dc656c25c3b3fe144b18e35ccead7b0abb0be9264 run #0: crashed: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put run #1: crashed: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put run #2: crashed: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put run #3: crashed: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put run #4: crashed: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put run #5: crashed: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put run #6: crashed: INFO: trying to register non-static key in l2cap_sock_teardown_cb run #7: crashed: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put run #8: crashed: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put run #9: crashed: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put testing current HEAD e1ae4b0be15891faf46d390e9f3dc9bd71a8cae1 testing commit e1ae4b0be15891faf46d390e9f3dc9bd71a8cae1 with gcc (GCC) 8.1.0 kernel signature: 5316429ae478e423728003fd1cc9ae352cb75ead594147bef97949d088c1cb49 all runs: crashed: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put revisions tested: 2, total time: 18m3.019239828s (build: 9m45.780004248s, test: 7m42.815948992s) the crash still happens on HEAD commit msg: Merge branch 'mtd/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux crash: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put BUG: kernel NULL pointer dereference, address: 0000000000000018 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 11637d067 P4D 11637d067 PUD 1166ee067 PMD 0 Oops: 0002 [#1] PREEMPT SMP CPU: 1 PID: 3323 Comm: kworker/1:2 Not tainted 5.11.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events l2cap_chan_timeout RIP: 0010:arch_atomic_fetch_sub arch/x86/include/asm/atomic.h:190 [inline] RIP: 0010:atomic_fetch_sub_release include/asm-generic/atomic-instrumented.h:221 [inline] RIP: 0010:__refcount_sub_and_test include/linux/refcount.h:272 [inline] RIP: 0010:__refcount_dec_and_test include/linux/refcount.h:315 [inline] RIP: 0010:refcount_dec_and_test include/linux/refcount.h:333 [inline] RIP: 0010:kref_put include/linux/kref.h:64 [inline] RIP: 0010:l2cap_chan_put+0x9/0x30 net/bluetooth/l2cap_core.c:502 Code: 31 db 48 89 d8 5b 5d 41 5c c3 4c 89 e7 e8 7f cc fd ff eb a9 0f 1f 00 66 2e 0f 1f 84 00 00 00 00 00 48 8d 57 18 b8 ff ff ff ff 0f c1 47 18 83 f8 01 74 05 85 c0 7e 09 c3 48 89 d7 e9 50 f7 ff RSP: 0018:ffffc900059afe18 EFLAGS: 00010246 RAX: 00000000ffffffff RBX: ffff888116639000 RCX: dead000000000122 RDX: 0000000000000018 RSI: ffff888116639c88 RDI: 0000000000000000 RBP: ffff888116639800 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000001 R11: 0000000000000000 R12: ffff888116210a70 R13: ffff888116639cb8 R14: ffff888116639910 R15: ffff888116639918 FS: 0000000000000000(0000) GS:ffff888237d00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000018 CR3: 00000001167ee000 CR4: 0000000000350ee0 Call Trace: l2cap_sock_kill.part.11+0x10/0x50 net/bluetooth/l2cap_sock.c:1217 l2cap_chan_timeout+0x7d/0xe0 net/bluetooth/l2cap_core.c:438 process_one_work+0x293/0x600 kernel/workqueue.c:2275 worker_thread+0x38/0x380 kernel/workqueue.c:2421 kthread+0x145/0x170 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 Modules linked in: CR2: 0000000000000018 ---[ end trace 7d0bd3157aba206d ]--- RIP: 0010:arch_atomic_fetch_sub arch/x86/include/asm/atomic.h:190 [inline] RIP: 0010:atomic_fetch_sub_release include/asm-generic/atomic-instrumented.h:221 [inline] RIP: 0010:__refcount_sub_and_test include/linux/refcount.h:272 [inline] RIP: 0010:__refcount_dec_and_test include/linux/refcount.h:315 [inline] RIP: 0010:refcount_dec_and_test include/linux/refcount.h:333 [inline] RIP: 0010:kref_put include/linux/kref.h:64 [inline] RIP: 0010:l2cap_chan_put+0x9/0x30 net/bluetooth/l2cap_core.c:502 Code: 31 db 48 89 d8 5b 5d 41 5c c3 4c 89 e7 e8 7f cc fd ff eb a9 0f 1f 00 66 2e 0f 1f 84 00 00 00 00 00 48 8d 57 18 b8 ff ff ff ff 0f c1 47 18 83 f8 01 74 05 85 c0 7e 09 c3 48 89 d7 e9 50 f7 ff RSP: 0018:ffffc900059afe18 EFLAGS: 00010246 RAX: 00000000ffffffff RBX: ffff888116639000 RCX: dead000000000122 RDX: 0000000000000018 RSI: ffff888116639c88 RDI: 0000000000000000 RBP: ffff888116639800 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000001 R11: 0000000000000000 R12: ffff888116210a70 R13: ffff888116639cb8 R14: ffff888116639910 R15: ffff888116639918 FS: 0000000000000000(0000) GS:ffff888237d00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000018 CR3: 00000001167ee000 CR4: 0000000000350ee0