================================ WARNING: inconsistent lock state 4.19.188-syzkaller #0 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. syz-executor.5/650 [HC0[0]:SC0[0]:HE1:SE1] takes: 00000000a588c629 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}, at: spin_lock include/linux/spinlock.h:329 [inline] 00000000a588c629 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}, at: sco_conn_del+0xe2/0x240 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+0x31/0x210 net/bluetooth/sco.c:82 call_timer_fn+0x177/0x700 kernel/time/timer.c:1338 expire_timers+0x243/0x4e0 kernel/time/timer.c:1375 __run_timers kernel/time/timer.c:1696 [inline] run_timer_softirq+0x21c/0x670 kernel/time/timer.c:1709 __do_softirq+0x265/0x980 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x215/0x260 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:535 [inline] smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1098 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894 arch_local_irq_enable arch/x86/include/asm/paravirt.h:799 [inline] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline] _raw_spin_unlock_irq+0x50/0x80 kernel/locking/spinlock.c:192 spin_unlock_irq include/linux/spinlock.h:379 [inline] blk_insert_flush+0x4fa/0xa10 block/blk-flush.c:517 blk_mq_make_request+0x108f/0x1c00 block/blk-mq.c:1884 generic_make_request+0x613/0xdf0 block/blk-core.c:2467 submit_bio+0xb1/0x430 block/blk-core.c:2576 submit_bio_wait+0x104/0x1b0 block/bio.c:930 blkdev_issue_flush+0x1f9/0x2f0 block/blk-flush.c:563 ext4_sync_file+0xd19/0x1420 fs/ext4/fsync.c:155 vfs_fsync_range+0x13a/0x220 fs/sync.c:197 generic_write_sync include/linux/fs.h:2750 [inline] ext4_file_write_iter+0x726/0xf20 fs/ext4/file.c:283 call_write_iter include/linux/fs.h:1821 [inline] do_iter_readv_writev+0x668/0x790 fs/read_write.c:681 do_iter_write+0x182/0x5d0 fs/read_write.c:960 vfs_iter_write+0x70/0xa0 fs/read_write.c:973 iter_file_splice_write+0x60d/0xbb0 fs/splice.c:750 do_splice_from fs/splice.c:852 [inline] direct_splice_actor+0x115/0x160 fs/splice.c:1025 splice_direct_to_actor+0x33f/0x8d0 fs/splice.c:980 do_splice_direct+0x1a7/0x270 fs/splice.c:1068 do_sendfile+0x550/0xc30 fs/read_write.c:1447 __do_sys_sendfile64 fs/read_write.c:1502 [inline] __se_sys_sendfile64+0xc4/0x160 fs/read_write.c:1494 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe irq event stamp: 15023 hardirqs last enabled at (15023): [] trace_hardirqs_on_thunk+0x1a/0x1c hardirqs last disabled at (15022): [] trace_hardirqs_off_thunk+0x1a/0x1c softirqs last enabled at (14698): [] spin_unlock_bh include/linux/spinlock.h:374 [inline] softirqs last enabled at (14698): [] peernet2id+0x8f/0xc0 net/core/net_namespace.c:266 softirqs last disabled at (14694): [] spin_lock_bh include/linux/spinlock.h:334 [inline] softirqs last disabled at (14694): [] 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.5/650: #0: 00000000662b1fac (rfkill_global_mutex){+.+.}, at: rfkill_fop_write+0xfe/0x4a0 net/rfkill/core.c:1241 #1: 00000000b55fea96 (&hdev->req_lock){+.+.}, at: hci_dev_do_close+0x196/0xf10 net/bluetooth/hci_core.c:1618 #2: 00000000a0c791bd (&hdev->lock){+.+.}, at: hci_dev_do_close+0x2e0/0xf10 net/bluetooth/hci_core.c:1655 #3: 00000000d033938f (hci_cb_list_lock){+.+.}, at: hci_disconn_cfm include/net/bluetooth/hci_core.h:1258 [inline] #3: 00000000d033938f (hci_cb_list_lock){+.+.}, at: hci_conn_hash_flush+0xda/0x260 net/bluetooth/hci_conn.c:1512 stack backtrace: CPU: 0 PID: 650 Comm: syz-executor.5 Not tainted 4.19.188-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+0x1fc/0x2ef lib/dump_stack.c:118 print_usage_bug.cold+0x42e/0x570 kernel/locking/lockdep.c:2544 valid_state kernel/locking/lockdep.c:2557 [inline] mark_lock_irq kernel/locking/lockdep.c:2751 [inline] mark_lock+0xc70/0x1160 kernel/locking/lockdep.c:3131 mark_irqflags kernel/locking/lockdep.c:3027 [inline] __lock_acquire+0x6a8/0x3ff0 kernel/locking/lockdep.c:3372 lock_acquire+0x170/0x3c0 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+0xe2/0x240 net/bluetooth/sco.c:175 sco_disconn_cfm+0x74/0xb0 net/bluetooth/sco.c:1133 hci_disconn_cfm include/net/bluetooth/hci_core.h:1261 [inline] hci_conn_hash_flush+0x127/0x260 net/bluetooth/hci_conn.c:1512 hci_dev_do_close+0x659/0xf10 net/bluetooth/hci_core.c:1668 hci_rfkill_set_block+0xe7/0x160 net/bluetooth/hci_core.c:2102 rfkill_set_block+0x1f9/0x540 net/rfkill/core.c:353 rfkill_fop_write+0x250/0x4a0 net/rfkill/core.c:1249 __vfs_write+0xf7/0x770 fs/read_write.c:485 vfs_write+0x1f3/0x540 fs/read_write.c:549 ksys_write+0x12b/0x2a0 fs/read_write.c:599 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x466459 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f4c34121188 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000466459 RDX: 0000000000000008 RSI: 0000000020000000 RDI: 0000000000000003 RBP: 00000000004bf9fb R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007ffe3cb5334f R14: 00007f4c34121300 R15: 0000000000022000 ebt_among_mt_check: 40 callbacks suppressed ebt_among: dst integrity fail: 200 ebt_among: dst integrity fail: 200 ebt_among: dst integrity fail: 200 ebt_among: dst integrity fail: 200 usb usb9: usbfs: process 795 (syz-executor.5) did not claim interface 0 before use ebt_among: dst integrity fail: 200 usb usb9: usbfs: process 801 (syz-executor.5) did not claim interface 0 before use ebt_among: dst integrity fail: 200 ebt_among: dst integrity fail: 200 ebt_among: dst integrity fail: 200 usb usb9: usbfs: process 813 (syz-executor.5) did not claim interface 0 before use ebt_among: dst integrity fail: 200 ebt_among: dst integrity fail: 200 ebt_among_mt_check: 47 callbacks suppressed ebt_among: dst integrity fail: 200 ebt_among: dst integrity fail: 200 ebt_among: dst integrity fail: 200 ebt_among: dst integrity fail: 200 ebt_among: dst integrity fail: 200 ebt_among: dst integrity fail: 200 ebt_among: dst integrity fail: 200 ebt_among: dst integrity fail: 200 ebt_among: dst integrity fail: 200 ebt_among: dst integrity fail: 200