================================ WARNING: inconsistent lock state 4.19.164-syzkaller #0 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. syz-executor.5/16818 [HC0[0]:SC0[0]:HE1:SE1] takes: 0000000083caf366 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}, at: spin_lock include/linux/spinlock.h:329 [inline] 0000000083caf366 (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+0x26c/0x9a0 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:545 [inline] smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1094 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894 irq event stamp: 3309 hardirqs last enabled at (3309): [] kfree+0x110/0x210 mm/slab.c:3823 hardirqs last disabled at (3308): [] kfree+0x6f/0x210 mm/slab.c:3816 softirqs last enabled at (2922): [] spin_unlock_bh include/linux/spinlock.h:374 [inline] softirqs last enabled at (2922): [] peernet2id+0x8f/0xc0 net/core/net_namespace.c:266 softirqs last disabled at (2920): [] spin_lock_bh include/linux/spinlock.h:334 [inline] softirqs last disabled at (2920): [] 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/16818: #0: 00000000e9e2c270 (rfkill_global_mutex){+.+.}, at: rfkill_fop_write+0xfe/0x4a0 net/rfkill/core.c:1241 #1: 00000000c807acb7 (&hdev->req_lock){+.+.}, at: hci_dev_do_close+0x196/0xf10 net/bluetooth/hci_core.c:1616 #2: 00000000f263b718 (&hdev->lock){+.+.}, at: hci_dev_do_close+0x2e0/0xf10 net/bluetooth/hci_core.c:1653 #3: 00000000774e7d0f (hci_cb_list_lock){+.+.}, at: hci_disconn_cfm include/net/bluetooth/hci_core.h:1258 [inline] #3: 00000000774e7d0f (hci_cb_list_lock){+.+.}, at: hci_conn_hash_flush+0xda/0x260 net/bluetooth/hci_conn.c:1512 stack backtrace: CPU: 0 PID: 16818 Comm: syz-executor.5 Not tainted 4.19.164-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/0x2fe 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:0x45e219 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:00007fefbbbcfc68 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045e219 RDX: 0000000000000009 RSI: 0000000020000000 RDI: 0000000000000009 RBP: 000000000119c068 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000119c034 R13: 00007fff085a80bf R14: 00007fefbbbd09c0 R15: 000000000119c034 netlink: 24 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 4 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 36 bytes leftover after parsing attributes in process `syz-executor.2'. device lo entered promiscuous mode hfs: unable to parse mount options Y4`Ҙ: renamed from lo IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 netlink: 12 bytes leftover after parsing attributes in process `syz-executor.5'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.5'. audit: type=1804 audit(3609680867.065:46): pid=17011 uid=0 auid=0 ses=4 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.0" name="/root/syzkaller-testdir186308617/syzkaller.Dj6tDx/252/file0/file0" dev="ramfs" ino=53573 res=1 audit: type=1804 audit(3609680867.065:47): pid=17073 uid=0 auid=0 ses=4 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.0" name="/root/syzkaller-testdir186308617/syzkaller.Dj6tDx/252/file0/file0" dev="ramfs" ino=53573 res=1 netlink: 'syz-executor.3': attribute type 5 has an invalid length. device ipvlan0 entered promiscuous mode netlink: 4 bytes leftover after parsing attributes in process `syz-executor.5'. UDF-fs: bad mount option "dont_measure" or missing value netlink: 4 bytes leftover after parsing attributes in process `syz-executor.5'. IPVS: ftp: loaded support on port[0] = 21 UDF-fs: bad mount option "dont_measure" or missing value IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 28 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 28 bytes leftover after parsing attributes in process `syz-executor.3'. IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 netlink: 'syz-executor.5': attribute type 11 has an invalid length. IPVS: ftp: loaded support on port[0] = 21 erofs: read_super, device -> /dev/loop2 xt_TCPMSS: Only works on TCP SYN packets erofs: options -> nouser_xattr,fault_injection=0x0000000000000005,smackfsfloor=}[!,dont_appraise,fowner=00000000000000060928,uid<00000000000000000000,func=FILE_MMAP,measure, xt_TCPMSS: Only works on TCP SYN packets erofs: cannot find valid erofs superblock xt_TCPMSS: Only works on TCP SYN packets xt_TCPMSS: Only works on TCP SYN packets xt_TCPMSS: Only works on TCP SYN packets xt_TCPMSS: Only works on TCP SYN packets