block nbd1: Receive control failed (result -107) ================================ WARNING: inconsistent lock state 4.14.193-syzkaller #0 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. syz-executor.3/30652 [HC0[0]:SC0[0]:HE1:SE1] takes: block nbd1: shutting down sockets (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}, at: [] spin_lock include/linux/spinlock.h:317 [inline] (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}, at: [] sco_conn_del+0xb0/0x1e0 net/bluetooth/sco.c:175 {IN-SOFTIRQ-W} state was registered at: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:152 spin_lock include/linux/spinlock.h:317 [inline] sco_sock_timeout+0x1a/0x150 net/bluetooth/sco.c:82 call_timer_fn+0x14a/0x650 kernel/time/timer.c:1280 expire_timers+0x232/0x4d0 kernel/time/timer.c:1319 __run_timers kernel/time/timer.c:1644 [inline] run_timer_softirq+0x1d5/0x5a0 kernel/time/timer.c:1657 __do_softirq+0x254/0xa1d kernel/softirq.c:288 invoke_softirq kernel/softirq.c:368 [inline] irq_exit+0x193/0x240 kernel/softirq.c:409 exiting_irq arch/x86/include/asm/apic.h:648 [inline] smp_apic_timer_interrupt+0x141/0x5e0 arch/x86/kernel/apic/apic.c:1102 apic_timer_interrupt+0x93/0xa0 arch/x86/entry/entry_64.S:793 preempt_count arch/x86/include/asm/preempt.h:23 [inline] __sanitizer_cov_trace_pc+0x15/0x50 kernel/kcov.c:65 do_direct_IO fs/direct-io.c:1078 [inline] do_blockdev_direct_IO fs/direct-io.c:1336 [inline] __blockdev_direct_IO+0xad1/0xdc60 fs/direct-io.c:1422 ext4_direct_IO_write fs/ext4/inode.c:3716 [inline] ext4_direct_IO+0x888/0x1b80 fs/ext4/inode.c:3857 generic_file_direct_write+0x1df/0x420 mm/filemap.c:2950 __generic_file_write_iter+0x2a2/0x590 mm/filemap.c:3129 ext4_file_write_iter+0x276/0xd20 fs/ext4/file.c:270 call_write_iter include/linux/fs.h:1778 [inline] new_sync_write fs/read_write.c:469 [inline] __vfs_write+0x44c/0x630 fs/read_write.c:482 vfs_write+0x17f/0x4d0 fs/read_write.c:544 SYSC_write fs/read_write.c:590 [inline] SyS_write+0xf2/0x210 fs/read_write.c:582 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb irq event stamp: 5611 hardirqs last enabled at (5611): [] kfree+0x14a/0x250 mm/slab.c:3816 hardirqs last disabled at (5610): [] kfree+0x6f/0x250 mm/slab.c:3809 softirqs last enabled at (5066): [] spin_unlock_bh include/linux/spinlock.h:362 [inline] softirqs last enabled at (5066): [] peernet2id+0x60/0x70 net/core/net_namespace.c:245 softirqs last disabled at (5064): [] spin_lock_bh include/linux/spinlock.h:322 [inline] softirqs last disabled at (5064): [] peernet2id+0x20/0x70 net/core/net_namespace.c:243 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/30652: #0: (rfkill_global_mutex){+.+.}, at: [] rfkill_fop_write+0xbf/0x3c0 net/rfkill/core.c:1225 #1: (&hdev->req_lock){+.+.}, at: [] hci_dev_do_close+0xfd/0xc50 net/bluetooth/hci_core.c:1576 #2: (&hdev->lock){+.+.}, at: [] hci_dev_do_close+0x210/0xc50 net/bluetooth/hci_core.c:1607 #3: (hci_cb_list_lock){+.+.}, at: [] hci_disconn_cfm include/net/bluetooth/hci_core.h:1223 [inline] #3: (hci_cb_list_lock){+.+.}, at: [] hci_conn_hash_flush+0xc7/0x220 net/bluetooth/hci_conn.c:1376 stack backtrace: CPU: 0 PID: 30652 Comm: syz-executor.3 Not tainted 4.14.193-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x283 lib/dump_stack.c:58 print_usage_bug.cold+0x42e/0x570 kernel/locking/lockdep.c:2589 valid_state kernel/locking/lockdep.c:2602 [inline] mark_lock_irq kernel/locking/lockdep.c:2796 [inline] mark_lock+0xb4d/0x1050 kernel/locking/lockdep.c:3194 mark_irqflags kernel/locking/lockdep.c:3090 [inline] __lock_acquire+0xd5c/0x3f20 kernel/locking/lockdep.c:3448 netlink: 220 bytes leftover after parsing attributes in process `syz-executor.5'. tc_ctl_action: received NO action attribs lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 block nbd1: Receive control failed (result -107) __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:152 spin_lock include/linux/spinlock.h:317 [inline] sco_conn_del+0xb0/0x1e0 net/bluetooth/sco.c:175 sco_disconn_cfm net/bluetooth/sco.c:1134 [inline] sco_disconn_cfm+0x50/0x60 net/bluetooth/sco.c:1127 block nbd1: shutting down sockets hci_disconn_cfm include/net/bluetooth/hci_core.h:1226 [inline] hci_conn_hash_flush+0x114/0x220 net/bluetooth/hci_conn.c:1376 hci_dev_do_close+0x542/0xc50 net/bluetooth/hci_core.c:1620 hci_rfkill_set_block net/bluetooth/hci_core.c:2050 [inline] hci_rfkill_set_block+0x94/0xe0 net/bluetooth/hci_core.c:2037 rfkill_set_block+0x1b2/0x4a0 net/rfkill/core.c:337 rfkill_fop_write+0x1b6/0x3c0 net/rfkill/core.c:1233 __vfs_write+0xe4/0x630 fs/read_write.c:480 vfs_write+0x17f/0x4d0 fs/read_write.c:544 SYSC_write fs/read_write.c:590 [inline] SyS_write+0xf2/0x210 fs/read_write.c:582 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45d239 RSP: 002b:00007f245cae4c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00000000000383c0 RCX: 000000000045d239 RDX: 0000000000000008 RSI: 0000000020000080 RDI: 0000000000000004 RBP: 000000000118cf80 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118cf4c R13: 00007fff8a99e99f R14: 00007f245cae59c0 R15: 000000000118cf4c netlink: 220 bytes leftover after parsing attributes in process `syz-executor.2'. tc_ctl_action: received NO action attribs tc_ctl_action: received NO action attribs netlink: 196 bytes leftover after parsing attributes in process `syz-executor.0'. netlink: 196 bytes leftover after parsing attributes in process `syz-executor.5'. netlink: 196 bytes leftover after parsing attributes in process `syz-executor.0'. netlink: 196 bytes leftover after parsing attributes in process `syz-executor.0'. block nbd1: Receive control failed (result -107) block nbd1: shutting down sockets netlink: 196 bytes leftover after parsing attributes in process `syz-executor.2'. block nbd1: Receive control failed (result -107) block nbd1: shutting down sockets block nbd1: Receive control failed (result -107) block nbd1: shutting down sockets block nbd4: Receive control failed (result -107) block nbd1: Receive control failed (result -107) block nbd1: shutting down sockets block nbd1: Receive control failed (result -107) block nbd1: shutting down sockets block nbd4: shutting down sockets nla_parse: 15 callbacks suppressed netlink: 196 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 196 bytes leftover after parsing attributes in process `syz-executor.3'. block nbd1: Receive control failed (result -107) block nbd4: Receive control failed (result -107) block nbd4: shutting down sockets block nbd1: shutting down sockets netlink: 196 bytes leftover after parsing attributes in process `syz-executor.2'. block nbd4: Receive control failed (result -107) block nbd4: shutting down sockets netlink: 196 bytes leftover after parsing attributes in process `syz-executor.3'. block nbd1: Receive control failed (result -107) block nbd1: shutting down sockets netlink: 196 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 196 bytes leftover after parsing attributes in process `syz-executor.5'. block nbd4: Receive control failed (result -107) block nbd4: shutting down sockets netlink: 196 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 196 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 196 bytes leftover after parsing attributes in process `syz-executor.5'. netlink: 196 bytes leftover after parsing attributes in process `syz-executor.3'. block nbd4: Receive control failed (result -107) block nbd4: shutting down sockets block nbd4: Receive control failed (result -107) block nbd4: shutting down sockets block nbd1: Device being setup by another task block nbd1: Receive control failed (result -107) block nbd1: Device being setup by another task tc_ctl_action: received NO action attribs block nbd4: shutting down sockets block nbd4: Receive control failed (result -107) block nbd4: shutting down sockets block nbd1: Device being setup by another task block nbd4: Receive control failed (result -107) tc_ctl_action: received NO action attribs block nbd4: shutting down sockets block nbd4: Receive control failed (result -107) block nbd4: shutting down sockets block nbd4: shutting down sockets block nbd4: Receive control failed (result -107) block nbd4: shutting down sockets block nbd4: Could not allocate knbd recv work queue. block nbd4: shutting down sockets block nbd4: Receive control failed (result -107) block nbd4: shutting down sockets tc_ctl_action: received NO action attribs SELinux: unrecognized netlink message: protocol=0 nlmsg_type=16433 sclass=netlink_route_socket pid=31344 comm=syz-executor.5 block nbd4: Receive control failed (result -107) block nbd4: shutting down sockets block nbd4: Receive control failed (result -107) block nbd4: shutting down sockets EXT4-fs (loop5): Unsupported filesystem blocksize 262144 (8 log_block_size) block nbd4: Receive control failed (result -107) block nbd4: shutting down sockets tc_ctl_action: received NO action attribs block nbd4: shutting down sockets EXT4-fs (loop5): Unsupported filesystem blocksize 262144 (8 log_block_size) block nbd4: Receive control failed (result -107) block nbd4: shutting down sockets block nbd4: shutting down sockets SELinux: unrecognized netlink message: protocol=0 nlmsg_type=59697 sclass=netlink_route_socket pid=31562 comm=syz-executor.5 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=59697 sclass=netlink_route_socket pid=31562 comm=syz-executor.5 tc_ctl_action: received NO action attribs block nbd4: Receive control failed (result -107) block nbd4: shutting down sockets tc_ctl_action: received NO action attribs block nbd4: Receive control failed (result -107) block nbd4: shutting down sockets tc_ctl_action: received NO action attribs block nbd4: Receive control failed (result -107) nla_parse: 53 callbacks suppressed netlink: 196 bytes leftover after parsing attributes in process `syz-executor.3'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=31 sclass=netlink_route_socket pid=31694 comm=syz-executor.5 netlink: 196 bytes leftover after parsing attributes in process `syz-executor.3'.