================================ WARNING: inconsistent lock state 4.14.193-syzkaller #0 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. syz-executor.4/27639 [HC0[0]:SC0[0]:HE1:SE1] takes: (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}, at: [] spin_lock include/linux/spinlock.h:317 [inline] (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}, at: [] sco_conn_del+0xb0/0x1e0 net/bluetooth/sco.c:175 {IN-SOFTIRQ-W} state was registered at: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:152 spin_lock include/linux/spinlock.h:317 [inline] sco_sock_timeout+0x1a/0x150 net/bluetooth/sco.c:82 call_timer_fn+0x14a/0x650 kernel/time/timer.c:1280 expire_timers+0x232/0x4d0 kernel/time/timer.c:1319 __run_timers kernel/time/timer.c:1644 [inline] run_timer_softirq+0x1d5/0x5a0 kernel/time/timer.c:1657 __do_softirq+0x254/0xa1d kernel/softirq.c:288 invoke_softirq kernel/softirq.c:368 [inline] irq_exit+0x193/0x240 kernel/softirq.c:409 exiting_irq arch/x86/include/asm/apic.h:648 [inline] smp_apic_timer_interrupt+0x141/0x5e0 arch/x86/kernel/apic/apic.c:1102 apic_timer_interrupt+0x93/0xa0 arch/x86/entry/entry_64.S:793 arch_local_irq_restore arch/x86/include/asm/paravirt.h:779 [inline] kmem_cache_free+0x173/0x2b0 mm/slab.c:3759 putname+0xcd/0x110 fs/namei.c:259 filename_lookup+0x37b/0x510 fs/namei.c:2386 user_path_at include/linux/namei.h:57 [inline] vfs_statx+0xd1/0x180 fs/stat.c:185 vfs_lstat include/linux/fs.h:3066 [inline] SYSC_newlstat fs/stat.c:350 [inline] SyS_newlstat+0x83/0xe0 fs/stat.c:344 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb irq event stamp: 6827 hardirqs last enabled at (6827): [] kfree+0x14a/0x250 mm/slab.c:3816 hardirqs last disabled at (6826): [] kfree+0x6f/0x250 mm/slab.c:3809 softirqs last enabled at (5312): [] spin_unlock_bh include/linux/spinlock.h:362 [inline] softirqs last enabled at (5312): [] peernet2id+0x60/0x70 net/core/net_namespace.c:245 softirqs last disabled at (5310): [] spin_lock_bh include/linux/spinlock.h:322 [inline] softirqs last disabled at (5310): [] peernet2id+0x20/0x70 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.4/27639: #0: (rfkill_global_mutex){+.+.}, at: [] rfkill_fop_write+0xbf/0x3c0 net/rfkill/core.c:1225 #1: (&hdev->req_lock){+.+.}, at: [] hci_dev_do_close+0xfd/0xc50 net/bluetooth/hci_core.c:1576 #2: (&hdev->lock){+.+.}, at: [] hci_dev_do_close+0x210/0xc50 net/bluetooth/hci_core.c:1607 #3: (hci_cb_list_lock){+.+.}, at: [] hci_disconn_cfm include/net/bluetooth/hci_core.h:1223 [inline] #3: (hci_cb_list_lock){+.+.}, at: [] hci_conn_hash_flush+0xc7/0x220 net/bluetooth/hci_conn.c:1376 stack backtrace: CPU: 0 PID: 27639 Comm: syz-executor.4 Not tainted 4.14.193-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x283 lib/dump_stack.c:58 print_usage_bug.cold+0x42e/0x570 kernel/locking/lockdep.c:2589 valid_state kernel/locking/lockdep.c:2602 [inline] mark_lock_irq kernel/locking/lockdep.c:2796 [inline] mark_lock+0xb4d/0x1050 kernel/locking/lockdep.c:3194 mark_irqflags kernel/locking/lockdep.c:3090 [inline] __lock_acquire+0xd5c/0x3f20 kernel/locking/lockdep.c:3448 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:152 spin_lock include/linux/spinlock.h:317 [inline] sco_conn_del+0xb0/0x1e0 net/bluetooth/sco.c:175 sco_disconn_cfm net/bluetooth/sco.c:1134 [inline] sco_disconn_cfm+0x50/0x60 net/bluetooth/sco.c:1127 hci_disconn_cfm include/net/bluetooth/hci_core.h:1226 [inline] hci_conn_hash_flush+0x114/0x220 net/bluetooth/hci_conn.c:1376 hci_dev_do_close+0x542/0xc50 net/bluetooth/hci_core.c:1620 hci_rfkill_set_block net/bluetooth/hci_core.c:2050 [inline] hci_rfkill_set_block+0x94/0xe0 net/bluetooth/hci_core.c:2037 rfkill_set_block+0x1b2/0x4a0 net/rfkill/core.c:337 audit: type=1800 audit(1597484452.643:5768): pid=27636 uid=0 auid=0 ses=4 subj=system_u:system_r:kernel_t:s0 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="file0" dev="sda1" ino=16658 res=0 rfkill_fop_write+0x1b6/0x3c0 net/rfkill/core.c:1233 __vfs_write+0xe4/0x630 fs/read_write.c:480 vfs_write+0x17f/0x4d0 fs/read_write.c:544 SYSC_write fs/read_write.c:590 [inline] SyS_write+0xf2/0x210 fs/read_write.c:582 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45d239 RSP: 002b:00007fabdfd2ec78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00000000000383c0 RCX: 000000000045d239 RDX: 0000000000000008 RSI: 0000000020000080 RDI: 0000000000000003 RBP: 000000000118d020 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118cfec R13: 00007ffc72ae79bf R14: 00007fabdfd2f9c0 R15: 000000000118cfec IPv6: ADDRCONF(NETDEV_CHANGE): ipip0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): ipip0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): ipip0: link becomes ready IPVS: ftp: loaded support on port[0] = 21 netlink: 36 bytes leftover after parsing attributes in process `syz-executor.0'. IPVS: ftp: loaded support on port[0] = 21 IPv6: ADDRCONF(NETDEV_CHANGE): gre0: link becomes ready 9pnet: p9_fd_create_tcp (27956): problem connecting socket to 127.0.0.1 9pnet: p9_fd_create_tcp (27959): problem connecting socket to 127.0.0.1 9pnet: p9_fd_create_tcp (27970): problem connecting socket to 127.0.0.1 netlink: 8 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.3'. 9pnet: p9_fd_create_tcp (27994): problem connecting socket to 127.0.0.1 9pnet: p9_fd_create_tcp (28047): problem connecting socket to 127.0.0.1 9pnet: p9_fd_create_tcp (28055): problem connecting socket to 127.0.0.1 9pnet: p9_fd_create_tcp (28071): problem connecting socket to 127.0.0.1 9pnet: p9_fd_create_tcp (28085): problem connecting socket to 127.0.0.1 9pnet: p9_fd_create_tcp (28126): problem connecting socket to 127.0.0.1 9pnet: p9_fd_create_tcp (28137): problem connecting socket to 127.0.0.1 9pnet: p9_fd_create_tcp (28147): problem connecting socket to 127.0.0.1 9pnet: p9_fd_create_tcp (28199): problem connecting socket to 127.0.0.1 9pnet: p9_fd_create_tcp (28252): problem connecting socket to 127.0.0.1