================================ WARNING: inconsistent lock state 4.19.148-syzkaller #0 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. syz-executor.3/24460 [HC0[0]:SC0[0]:HE1:SE1] takes: 00000000d6fc75ac (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}, at: spin_lock include/linux/spinlock.h:329 [inline] 00000000d6fc75ac (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}, at: sco_conn_del+0xac/0x170 net/bluetooth/sco.c:175 {IN-SOFTIRQ-W} state was registered at: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [inline] sco_sock_timeout+0x22/0xe0 net/bluetooth/sco.c:82 call_timer_fn+0x177/0x760 kernel/time/timer.c:1338 expire_timers+0x243/0x500 kernel/time/timer.c:1375 __run_timers kernel/time/timer.c:1703 [inline] run_timer_softirq+0x259/0x730 kernel/time/timer.c:1716 __do_softirq+0x27d/0xad2 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x22d/0x270 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:544 [inline] smp_apic_timer_interrupt+0x15f/0x5d0 arch/x86/kernel/apic/apic.c:1094 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894 debug_lockdep_rcu_enabled+0x6d/0xe0 kernel/rcu/update.c:253 trace_kmalloc_node include/trace/events/kmem.h:100 [inline] kmem_cache_alloc_node_trace+0x33d/0x4d0 mm/slab.c:3669 __do_kmalloc_node mm/slab.c:3688 [inline] __kmalloc_node+0x38/0x70 mm/slab.c:3696 kmalloc_node include/linux/slab.h:557 [inline] kvmalloc_node+0xb4/0xf0 mm/util.c:423 kvmalloc include/linux/mm.h:577 [inline] kvzalloc include/linux/mm.h:585 [inline] __kvm_set_memory_region+0xb65/0x2080 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1082 kvm_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1144 [inline] kvm_vm_ioctl_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1156 [inline] kvm_vm_ioctl+0x78b/0x17e0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3223 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x670 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe irq event stamp: 2533 hardirqs last enabled at (2533): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline] hardirqs last enabled at (2533): [] _raw_spin_unlock_irq+0x24/0x90 kernel/locking/spinlock.c:192 hardirqs last disabled at (2532): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline] hardirqs last disabled at (2532): [] _raw_spin_lock_irq+0x35/0x90 kernel/locking/spinlock.c:160 softirqs last enabled at (2444): [] spin_unlock_bh include/linux/spinlock.h:374 [inline] softirqs last enabled at (2444): [] peernet2id+0x8f/0xc0 net/core/net_namespace.c:266 softirqs last disabled at (2442): [] spin_lock_bh include/linux/spinlock.h:334 [inline] softirqs last disabled at (2442): [] peernet2id+0x6f/0xc0 net/core/net_namespace.c:264 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.3/24460: #0: 00000000b4179e51 (rfkill_global_mutex){+.+.}, at: rfkill_fop_write+0x100/0x580 net/rfkill/core.c:1241 #1: 000000001eb733c3 (&hdev->req_lock){+.+.}, at: hci_dev_do_close+0x177/0xe70 net/bluetooth/hci_core.c:1616 #2: 0000000065a6a3b7 (&hdev->lock){+.+.}, at: hci_dev_do_close+0x2c1/0xe70 net/bluetooth/hci_core.c:1653 #3: 00000000a520efe0 (hci_cb_list_lock){+.+.}, at: hci_disconn_cfm include/net/bluetooth/hci_core.h:1258 [inline] #3: 00000000a520efe0 (hci_cb_list_lock){+.+.}, at: hci_conn_hash_flush+0xc7/0x220 net/bluetooth/hci_conn.c:1495 stack backtrace: CPU: 1 PID: 24460 Comm: syz-executor.3 Not tainted 4.19.148-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+0x22c/0x33e lib/dump_stack.c:118 print_usage_bug.cold+0x4d7/0x68b kernel/locking/lockdep.c:2544 valid_state kernel/locking/lockdep.c:2557 [inline] mark_lock_irq kernel/locking/lockdep.c:2751 [inline] mark_lock+0xd32/0x13b0 kernel/locking/lockdep.c:3131 mark_irqflags kernel/locking/lockdep.c:3027 [inline] __lock_acquire+0x6c2/0x3ff0 kernel/locking/lockdep.c:3372 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3907 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [inline] sco_conn_del+0xac/0x170 net/bluetooth/sco.c:175 sco_disconn_cfm net/bluetooth/sco.c:1133 [inline] sco_disconn_cfm+0x62/0x80 net/bluetooth/sco.c:1126 hci_disconn_cfm include/net/bluetooth/hci_core.h:1261 [inline] hci_conn_hash_flush+0x114/0x220 net/bluetooth/hci_conn.c:1495 hci_dev_do_close+0x623/0xe70 net/bluetooth/hci_core.c:1666 hci_rfkill_set_block+0x102/0x130 net/bluetooth/hci_core.c:2100 rfkill_set_block+0x1f9/0x4b0 net/rfkill/core.c:353 rfkill_fop_write+0x287/0x580 net/rfkill/core.c:1249 do_loop_readv_writev fs/read_write.c:704 [inline] do_loop_readv_writev fs/read_write.c:688 [inline] do_iter_write+0x461/0x5d0 fs/read_write.c:962 vfs_writev+0x153/0x2e0 fs/read_write.c:1005 do_writev+0x136/0x330 fs/read_write.c:1040 do_syscall_64+0xf9/0x670 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45dd99 Code: 0d b4 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 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f04a9e1fc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 000000000003a680 RCX: 000000000045dd99 RDX: 0000000000000002 RSI: 0000000020000000 RDI: 0000000000000004 RBP: 000000000118bf60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bf2c R13: 00007ffe7057f9af R14: 00007f04a9e209c0 R15: 000000000118bf2c ISO 9660 Extensions: Microsoft Joliet Level 3 ISOFS: unable to read i-node block ISO 9660 Extensions: Microsoft Joliet Level 3 ISOFS: unable to read i-node block ISO 9660 Extensions: Microsoft Joliet Level 3 ISOFS: unable to read i-node block