================================ WARNING: inconsistent lock state 4.19.176-syzkaller #0 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. syz-executor.5/12480 [HC0[0]:SC0[0]:HE1:SE1] takes: 0000000063907572 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}, at: spin_lock include/linux/spinlock.h:329 [inline] 0000000063907572 (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 do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1092 do_softirq.part.0+0x160/0x1c0 kernel/softirq.c:336 do_softirq kernel/softirq.c:328 [inline] __local_bh_enable_ip+0x20e/0x270 kernel/softirq.c:189 local_bh_enable include/linux/bottom_half.h:32 [inline] get_next_corpse net/netfilter/nf_conntrack_core.c:1928 [inline] nf_ct_iterate_cleanup+0x239/0x520 net/netfilter/nf_conntrack_core.c:1951 nf_ct_iterate_cleanup_net net/netfilter/nf_conntrack_core.c:2036 [inline] nf_ct_iterate_cleanup_net+0x113/0x170 net/netfilter/nf_conntrack_core.c:2021 masq_device_event+0xd6/0x110 net/ipv4/netfilter/nf_nat_masquerade_ipv4.c:100 notifier_call_chain+0xc0/0x230 kernel/notifier.c:93 call_netdevice_notifiers net/core/dev.c:1762 [inline] dev_close_many+0x323/0x670 net/core/dev.c:1514 rollback_registered_many+0x2f7/0xe70 net/core/dev.c:8165 unregister_netdevice_many.part.0+0x1a/0x300 net/core/dev.c:9316 unregister_netdevice_many net/core/dev.c:9315 [inline] default_device_exit_batch+0x2fa/0x3c0 net/core/dev.c:9787 ops_exit_list+0xf9/0x150 net/core/net_namespace.c:156 cleanup_net+0x3b4/0x8b0 net/core/net_namespace.c:553 process_one_work+0x864/0x1570 kernel/workqueue.c:2152 worker_thread+0x64c/0x1130 kernel/workqueue.c:2295 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 irq event stamp: 1417 hardirqs last enabled at (1417): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline] hardirqs last enabled at (1417): [] _raw_spin_unlock_irq+0x24/0x80 kernel/locking/spinlock.c:192 hardirqs last disabled at (1416): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline] hardirqs last disabled at (1416): [] _raw_spin_lock_irq+0x35/0x80 kernel/locking/spinlock.c:160 softirqs last enabled at (1322): [] spin_unlock_bh include/linux/spinlock.h:374 [inline] softirqs last enabled at (1322): [] peernet2id+0x8f/0xc0 net/core/net_namespace.c:266 softirqs last disabled at (1320): [] spin_lock_bh include/linux/spinlock.h:334 [inline] softirqs last disabled at (1320): [] 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/12480: #0: 00000000d04871da (rfkill_global_mutex){+.+.}, at: rfkill_fop_write+0xfe/0x4a0 net/rfkill/core.c:1241 #1: 0000000085fc7fef (&hdev->req_lock){+.+.}, at: hci_dev_do_close+0x196/0xf10 net/bluetooth/hci_core.c:1616 #2: 00000000d9022fdd (&hdev->lock){+.+.}, at: hci_dev_do_close+0x2e0/0xf10 net/bluetooth/hci_core.c:1653 #3: 00000000dbe92ac9 (hci_cb_list_lock){+.+.}, at: hci_disconn_cfm include/net/bluetooth/hci_core.h:1258 [inline] #3: 00000000dbe92ac9 (hci_cb_list_lock){+.+.}, at: hci_conn_hash_flush+0xda/0x260 net/bluetooth/hci_conn.c:1512 stack backtrace: CPU: 0 PID: 12480 Comm: syz-executor.5 Not tainted 4.19.176-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:1666 hci_rfkill_set_block+0xe7/0x160 net/bluetooth/hci_core.c:2100 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:0x465ef9 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:00007fb2ae9f6188 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000465ef9 RDX: 0000000000000008 RSI: 0000000020000000 RDI: 0000000000000004 RBP: 00000000004bcd1c R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007fff32b9df5f R14: 00007fb2ae9f6300 R15: 0000000000022000 audit: type=1800 audit(1613946753.441:16): pid=12563 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.0" name="file0" dev="sda1" ino=15958 res=0 audit: type=1804 audit(1613946753.481:17): pid=12563 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.0" name="/root/syzkaller-testdir981888117/syzkaller.bkdguH/19/file0" dev="sda1" ino=15958 res=1 EXT4-fs (loop5): Unrecognized mount option "–W" or missing value ISO 9660 Extensions: Microsoft Joliet Level 3 EXT4-fs (loop3): Unrecognized mount option "–W" or missing value ISO 9660 Extensions: Microsoft Joliet Level 3 ISO 9660 Extensions: Microsoft Joliet Level 3