================================ WARNING: inconsistent lock state 5.10.60 #1 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. syz-executor.0/12157 [HC0[0]:SC0[0]:HE1:SE1] takes: ffff8880459fa0a0 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] ffff8880459fa0a0 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}-{2:2}, at: sco_conn_del+0x128/0x270 net/bluetooth/sco.c:176 {IN-SOFTIRQ-W} state was registered at: lock_acquire kernel/locking/lockdep.c:5560 [inline] lock_acquire+0x197/0x490 kernel/locking/lockdep.c:5525 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x27/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:354 [inline] sco_sock_timeout+0x24/0x150 net/bluetooth/sco.c:83 call_timer_fn+0x182/0x580 kernel/time/timer.c:1414 expire_timers kernel/time/timer.c:1459 [inline] __run_timers.part.0+0x666/0x9d0 kernel/time/timer.c:1750 __run_timers kernel/time/timer.c:1731 [inline] run_timer_softirq+0x80/0x120 kernel/time/timer.c:1763 __do_softirq+0x1b6/0x86a kernel/softirq.c:298 asm_call_irq_on_stack+0x12/0x20 __run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline] run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline] do_softirq_own_stack+0x80/0xa0 arch/x86/kernel/irq_64.c:77 invoke_softirq kernel/softirq.c:393 [inline] __irq_exit_rcu kernel/softirq.c:423 [inline] irq_exit_rcu+0x110/0x1a0 kernel/softirq.c:435 sysvec_apic_timer_interrupt+0x43/0xa0 arch/x86/kernel/apic/apic.c:1095 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:635 native_restore_fl arch/x86/include/asm/irqflags.h:41 [inline] arch_local_irq_restore arch/x86/include/asm/irqflags.h:84 [inline] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] _raw_spin_unlock_irqrestore+0x25/0x40 kernel/locking/spinlock.c:191 scan_object mm/kmemleak.c:1349 [inline] scan_gray_list+0x1c9/0x370 mm/kmemleak.c:1381 kmemleak_scan+0x4fe/0x1140 mm/kmemleak.c:1489 kmemleak_write+0x55a/0x660 mm/kmemleak.c:1820 full_proxy_write+0x11d/0x190 fs/debugfs/file.c:234 vfs_write+0x295/0xa50 fs/read_write.c:603 ksys_write+0x12d/0x250 fs/read_write.c:658 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 irq event stamp: 2727 hardirqs last enabled at (2727): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline] hardirqs last enabled at (2727): [] _raw_spin_unlock_irq+0x1f/0x30 kernel/locking/spinlock.c:199 hardirqs last disabled at (2726): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline] hardirqs last disabled at (2726): [] _raw_spin_lock_irq+0x3e/0x40 kernel/locking/spinlock.c:167 softirqs last enabled at (2530): [] asm_call_irq_on_stack+0x12/0x20 softirqs last disabled at (2499): [] asm_call_irq_on_stack+0x12/0x20 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 *** 3 locks held by syz-executor.0/12157: #0: ffff8880459b0f40 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close+0xee/0x1240 net/bluetooth/hci_core.c:1727 #1: ffff8880459b0078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_do_close+0x23f/0x1240 net/bluetooth/hci_core.c:1764 #2: ffffffff85366d28 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_disconn_cfm include/net/bluetooth/hci_core.h:1440 [inline] #2: ffffffff85366d28 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xc7/0x230 net/bluetooth/hci_conn.c:1557 stack backtrace: CPU: 1 PID: 12157 Comm: syz-executor.0 Not tainted 5.10.60 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:118 print_usage_bug kernel/locking/lockdep.c:3857 [inline] valid_state kernel/locking/lockdep.c:3869 [inline] mark_lock_irq kernel/locking/lockdep.c:4072 [inline] mark_lock.cold+0x19/0x159 kernel/locking/lockdep.c:4529 mark_usage kernel/locking/lockdep.c:4442 [inline] __lock_acquire+0x8cf/0x5b60 kernel/locking/lockdep.c:4904 lock_acquire kernel/locking/lockdep.c:5560 [inline] lock_acquire+0x197/0x490 kernel/locking/lockdep.c:5525 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x27/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:354 [inline] sco_conn_del+0x128/0x270 net/bluetooth/sco.c:176 sco_disconn_cfm net/bluetooth/sco.c:1189 [inline] sco_disconn_cfm+0x62/0x80 net/bluetooth/sco.c:1182 hci_disconn_cfm include/net/bluetooth/hci_core.h:1443 [inline] hci_conn_hash_flush+0x119/0x230 net/bluetooth/hci_conn.c:1557 hci_dev_do_close+0x717/0x1240 net/bluetooth/hci_core.c:1777 hci_unregister_dev+0x149/0x430 net/bluetooth/hci_core.c:3835 vhci_release+0x70/0xe0 drivers/bluetooth/hci_vhci.c:340 __fput+0x285/0x970 fs/file_table.c:281 task_work_run+0xe2/0x1a0 kernel/task_work.c:151 exit_task_work include/linux/task_work.h:30 [inline] do_exit+0xc0f/0x2770 kernel/exit.c:811 do_group_exit+0x125/0x310 kernel/exit.c:908 get_signal+0x469/0x2210 kernel/signal.c:2758 arch_do_signal+0x88/0x1b00 arch/x86/kernel/signal.c:805 exit_to_user_mode_loop kernel/entry/common.c:161 [inline] exit_to_user_mode_prepare+0xf7/0x160 kernel/entry/common.c:191 syscall_exit_to_user_mode+0x38/0x230 kernel/entry/common.c:266 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x466609 Code: Unable to access opcode bytes at RIP 0x4665df. RSP: 002b:00007fc870389218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000056bf88 RCX: 0000000000466609 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000056bf88 RBP: 000000000056bf80 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf8c R13: 00007fffd5d9b96f R14: 00007fc870389300 R15: 0000000000022000 EXT4-fs (loop3): mounting ext2 file system using the ext4 subsystem EXT4-fs (loop3): inodes count not valid: 1835040 vs 32 serio: Serial port tty32 EXT4-fs (loop3): mounting ext2 file system using the ext4 subsystem EXT4-fs (loop3): inodes count not valid: 1835040 vs 32 EXT4-fs (loop7): mounting ext2 file system using the ext4 subsystem EXT4-fs (loop7): bad geometry: block count 256 exceeds size of device (12 blocks) EXT4-fs (loop7): mounting ext2 file system using the ext4 subsystem EXT4-fs (loop7): bad geometry: block count 256 exceeds size of device (12 blocks) EXT4-fs error (device loop6): ext4_orphan_get:1413: comm syz-executor.6: bad orphan inode 31 ext4_test_bit(bit=30, block=3) = 0 EXT4-fs (loop6): mounted filesystem without journal. Opts: ,errors=continue