================================ WARNING: inconsistent lock state 4.14.218-syzkaller #0 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. syz-executor.5/5974 [HC0[0]:SC0[0]:HE1:SE1] takes: (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}, at: [] spin_lock syzkaller/managers/linux-4-14/kernel/./include/linux/spinlock.h:317 [inline] (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}, at: [] sco_conn_del+0xbf/0x290 syzkaller/managers/linux-4-14/kernel/net/bluetooth/sco.c:175 {IN-SOFTIRQ-W} state was registered at: lock_acquire+0x170/0x3f0 syzkaller/managers/linux-4-14/kernel/kernel/locking/lockdep.c:3998 __raw_spin_lock syzkaller/managers/linux-4-14/kernel/./include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 syzkaller/managers/linux-4-14/kernel/kernel/locking/spinlock.c:152 spin_lock syzkaller/managers/linux-4-14/kernel/./include/linux/spinlock.h:317 [inline] sco_sock_timeout+0x29/0x1c0 syzkaller/managers/linux-4-14/kernel/net/bluetooth/sco.c:82 call_timer_fn+0x14a/0x650 syzkaller/managers/linux-4-14/kernel/kernel/time/timer.c:1280 expire_timers+0x232/0x4d0 syzkaller/managers/linux-4-14/kernel/kernel/time/timer.c:1319 __run_timers syzkaller/managers/linux-4-14/kernel/kernel/time/timer.c:1637 [inline] run_timer_softirq+0x1d5/0x5a0 syzkaller/managers/linux-4-14/kernel/kernel/time/timer.c:1650 __do_softirq+0x24d/0x9ff syzkaller/managers/linux-4-14/kernel/kernel/softirq.c:288 invoke_softirq syzkaller/managers/linux-4-14/kernel/kernel/softirq.c:368 [inline] irq_exit+0x193/0x240 syzkaller/managers/linux-4-14/kernel/kernel/softirq.c:409 exiting_irq syzkaller/managers/linux-4-14/kernel/./arch/x86/include/asm/apic.h:648 [inline] smp_apic_timer_interrupt+0x141/0x5e0 syzkaller/managers/linux-4-14/kernel/arch/x86/kernel/apic/apic.c:1102 apic_timer_interrupt+0x93/0xa0 syzkaller/managers/linux-4-14/kernel/arch/x86/entry/entry_64.S:793 __down_read syzkaller/managers/linux-4-14/kernel/./arch/x86/include/asm/rwsem.h:66 [inline] down_read+0x3d/0x80 syzkaller/managers/linux-4-14/kernel/kernel/locking/rwsem.c:26 inode_lock_shared syzkaller/managers/linux-4-14/kernel/./include/linux/fs.h:729 [inline] do_last syzkaller/managers/linux-4-14/kernel/fs/namei.c:3333 [inline] path_openat+0x149b/0x2970 syzkaller/managers/linux-4-14/kernel/fs/namei.c:3569 do_filp_open+0x179/0x3c0 syzkaller/managers/linux-4-14/kernel/fs/namei.c:3603 do_sys_open+0x296/0x410 syzkaller/managers/linux-4-14/kernel/fs/open.c:1081 do_syscall_64+0x1d5/0x640 syzkaller/managers/linux-4-14/kernel/arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb irq event stamp: 5637 hardirqs last enabled at (5637): [] kfree+0x14a/0x250 syzkaller/managers/linux-4-14/kernel/mm/slab.c:3816 hardirqs last disabled at (5636): [] kfree+0x6f/0x250 syzkaller/managers/linux-4-14/kernel/mm/slab.c:3809 softirqs last enabled at (5388): [] spin_unlock_bh syzkaller/managers/linux-4-14/kernel/./include/linux/spinlock.h:362 [inline] softirqs last enabled at (5388): [] peernet2id+0x60/0x70 syzkaller/managers/linux-4-14/kernel/net/core/net_namespace.c:245 softirqs last disabled at (5386): [] spin_lock_bh syzkaller/managers/linux-4-14/kernel/./include/linux/spinlock.h:322 [inline] softirqs last disabled at (5386): [] peernet2id+0x20/0x70 syzkaller/managers/linux-4-14/kernel/net/core/net_namespace.c:243 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(slock-AF_BLUETOOTH-BTPROTO_SCO); lock(slock-AF_BLUETOOTH-BTPROTO_SCO); *** DEADLOCK *** 4 locks held by syz-executor.5/5974: #0: (rfkill_global_mutex){+.+.}, at: [] rfkill_fop_write+0xbf/0x3c0 syzkaller/managers/linux-4-14/kernel/net/rfkill/core.c:1225 #1: (&hdev->req_lock){+.+.}, at: [] hci_dev_do_close+0x109/0xca0 syzkaller/managers/linux-4-14/kernel/net/bluetooth/hci_core.c:1576 #2: (&hdev->lock){+.+.}, at: [] hci_dev_do_close+0x21c/0xca0 syzkaller/managers/linux-4-14/kernel/net/bluetooth/hci_core.c:1607 #3: (hci_cb_list_lock){+.+.}, at: [] hci_disconn_cfm syzkaller/managers/linux-4-14/kernel/./include/net/bluetooth/hci_core.h:1223 [inline] #3: (hci_cb_list_lock){+.+.}, at: [] hci_conn_hash_flush+0xda/0x260 syzkaller/managers/linux-4-14/kernel/net/bluetooth/hci_conn.c:1393 stack backtrace: CPU: 1 PID: 5974 Comm: syz-executor.5 Not tainted 4.14.218-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack syzkaller/managers/linux-4-14/kernel/lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 syzkaller/managers/linux-4-14/kernel/lib/dump_stack.c:58 print_usage_bug.cold+0x42e/0x570 syzkaller/managers/linux-4-14/kernel/kernel/locking/lockdep.c:2589 valid_state syzkaller/managers/linux-4-14/kernel/kernel/locking/lockdep.c:2602 [inline] mark_lock_irq syzkaller/managers/linux-4-14/kernel/kernel/locking/lockdep.c:2796 [inline] mark_lock+0xb4d/0x1050 syzkaller/managers/linux-4-14/kernel/kernel/locking/lockdep.c:3194 mark_irqflags syzkaller/managers/linux-4-14/kernel/kernel/locking/lockdep.c:3090 [inline] __lock_acquire+0xd5c/0x3f20 syzkaller/managers/linux-4-14/kernel/kernel/locking/lockdep.c:3448 lock_acquire+0x170/0x3f0 syzkaller/managers/linux-4-14/kernel/kernel/locking/lockdep.c:3998 __raw_spin_lock syzkaller/managers/linux-4-14/kernel/./include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 syzkaller/managers/linux-4-14/kernel/kernel/locking/spinlock.c:152 spin_lock syzkaller/managers/linux-4-14/kernel/./include/linux/spinlock.h:317 [inline] sco_conn_del+0xbf/0x290 syzkaller/managers/linux-4-14/kernel/net/bluetooth/sco.c:175 sco_disconn_cfm+0x65/0xa0 syzkaller/managers/linux-4-14/kernel/net/bluetooth/sco.c:1134 hci_disconn_cfm syzkaller/managers/linux-4-14/kernel/./include/net/bluetooth/hci_core.h:1226 [inline] hci_conn_hash_flush+0x127/0x260 syzkaller/managers/linux-4-14/kernel/net/bluetooth/hci_conn.c:1393 hci_dev_do_close+0x535/0xca0 syzkaller/managers/linux-4-14/kernel/net/bluetooth/hci_core.c:1620 hci_rfkill_set_block+0xaf/0x120 syzkaller/managers/linux-4-14/kernel/net/bluetooth/hci_core.c:2050 rfkill_set_block+0x1b2/0x4a0 syzkaller/managers/linux-4-14/kernel/net/rfkill/core.c:337 rfkill_fop_write+0x1b6/0x3c0 syzkaller/managers/linux-4-14/kernel/net/rfkill/core.c:1233 __vfs_write+0xe4/0x630 syzkaller/managers/linux-4-14/kernel/fs/read_write.c:480 vfs_write+0x17f/0x4d0 syzkaller/managers/linux-4-14/kernel/fs/read_write.c:544 SYSC_write syzkaller/managers/linux-4-14/kernel/fs/read_write.c:590 [inline] SyS_write+0xf2/0x210 syzkaller/managers/linux-4-14/kernel/fs/read_write.c:582 do_syscall_64+0x1d5/0x640 syzkaller/managers/linux-4-14/kernel/arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x465b09 RSP: 002b:00007faff09d0188 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000465b09 RDX: 0000000000000008 RSI: 0000000020000000 RDI: 0000000000000004 RBP: 00000000004b069f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007fff85f25cff R14: 00007faff09d0300 R15: 0000000000022000 encrypted_key: keyword 'update' not allowed when called from .instantiate method encrypted_key: keyword 'update' not allowed when called from .instantiate method encrypted_key: keyword 'update' not allowed when called from .instantiate method encrypted_key: keyword 'update' not allowed when called from .instantiate method