block nbd9: Receive control failed (result -107) ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Tainted: G L ------------------------------------------------------ kworker/u9:2/4708 is trying to acquire lock: ffff0000c6713660 (sk_lock-AF_INET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1713 [inline] ffff0000c6713660 (sk_lock-AF_INET){+.+.}-{0:0}, at: inet_shutdown+0x74/0x34c net/ipv4/af_inet.c:915 but task is already holding lock: ffff00011e4fa668 (&nsock->tx_lock){+.+.}-{4:4}, at: recv_work+0x1c30/0x1d54 drivers/block/nbd.c:1020 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #6 (&nsock->tx_lock){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x160/0xef8 kernel/locking/mutex.c:820 mutex_lock_nested+0x24/0x30 kernel/locking/mutex.c:873 nbd_handle_cmd drivers/block/nbd.c:1143 [inline] nbd_queue_rq+0x208/0xc44 drivers/block/nbd.c:1207 blk_mq_dispatch_rq_list+0x3bc/0x13a4 block/blk-mq.c:2148 __blk_mq_do_dispatch_sched block/blk-mq-sched.c:168 [inline] blk_mq_do_dispatch_sched block/blk-mq-sched.c:182 [inline] __blk_mq_sched_dispatch_requests+0xa40/0x10bc block/blk-mq-sched.c:307 blk_mq_sched_dispatch_requests+0xa4/0x154 block/blk-mq-sched.c:329 blk_mq_run_hw_queue+0x300/0x4dc block/blk-mq.c:2386 blk_mq_dispatch_list+0xa2c/0xb2c block/blk-mq.c:-1 blk_mq_flush_plug_list+0x3a4/0x484 block/blk-mq.c:2997 __blk_flush_plug+0x338/0x410 block/blk-core.c:1230 blk_finish_plug block/blk-core.c:1257 [inline] __submit_bio+0x39c/0x478 block/blk-core.c:649 __submit_bio_noacct_mq block/blk-core.c:722 [inline] submit_bio_noacct_nocheck+0x284/0xa98 block/blk-core.c:753 submit_bio_noacct+0xd90/0x1814 block/blk-core.c:884 submit_bio+0x38c/0x528 block/blk-core.c:926 blk_crypto_submit_bio include/linux/blk-crypto.h:203 [inline] submit_bh_wbc+0x4b0/0x594 fs/buffer.c:2737 submit_bh fs/buffer.c:2742 [inline] block_read_full_folio+0x468/0x734 fs/buffer.c:2344 blkdev_read_folio+0x28/0x38 block/fops.c:494 filemap_read_folio+0xf0/0x2fc mm/filemap.c:2502 do_read_cache_folio+0x368/0x5b8 mm/filemap.c:4107 read_cache_folio+0x68/0x84 mm/filemap.c:4139 read_mapping_folio include/linux/pagemap.h:1017 [inline] read_part_sector+0xcc/0x708 block/partitions/core.c:724 adfspart_check_ICS+0xa4/0x6fc block/partitions/acorn.c:356 check_partition block/partitions/core.c:143 [inline] blk_add_partitions block/partitions/core.c:591 [inline] bdev_disk_changed+0x6fc/0x11c8 block/partitions/core.c:695 blkdev_get_whole+0x15c/0x240 block/bdev.c:756 bdev_open+0x2d8/0x8cc block/bdev.c:965 blkdev_open+0x2d8/0x404 block/fops.c:697 do_dentry_open+0x5c4/0xfc8 fs/open.c:947 vfs_open+0x44/0x2d4 fs/open.c:1079 do_open fs/namei.c:4699 [inline] path_openat+0x2234/0x2a6c fs/namei.c:4858 do_file_open+0x1c4/0x2e4 fs/namei.c:4887 do_sys_openat2+0x114/0x1e8 fs/open.c:1364 do_sys_open+0xac/0xdc fs/open.c:1370 __do_sys_openat fs/open.c:1386 [inline] __se_sys_openat fs/open.c:1381 [inline] __arm64_sys_openat+0x9c/0xb8 fs/open.c:1381 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x244 arch/arm64/kernel/syscall.c:49 el0_svc_common+0xe8/0x23c arch/arm64/kernel/syscall.c:121 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:140 el0_svc+0x64/0x260 arch/arm64/kernel/entry-common.c:740 el0t_64_sync_handler+0x48/0x148 arch/arm64/kernel/entry-common.c:759 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:594 -> #5 (&cmd->lock){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x160/0xef8 kernel/locking/mutex.c:820 mutex_lock_nested+0x24/0x30 kernel/locking/mutex.c:873 nbd_queue_rq+0xb0/0xc44 drivers/block/nbd.c:1199 blk_mq_dispatch_rq_list+0x3bc/0x13a4 block/blk-mq.c:2148 __blk_mq_do_dispatch_sched block/blk-mq-sched.c:168 [inline] blk_mq_do_dispatch_sched block/blk-mq-sched.c:182 [inline] __blk_mq_sched_dispatch_requests+0xa40/0x10bc block/blk-mq-sched.c:307 blk_mq_sched_dispatch_requests+0xa4/0x154 block/blk-mq-sched.c:329 blk_mq_run_hw_queue+0x300/0x4dc block/blk-mq.c:2386 blk_mq_dispatch_list+0xa2c/0xb2c block/blk-mq.c:-1 blk_mq_flush_plug_list+0x3a4/0x484 block/blk-mq.c:2997 __blk_flush_plug+0x338/0x410 block/blk-core.c:1230 blk_finish_plug block/blk-core.c:1257 [inline] __submit_bio+0x39c/0x478 block/blk-core.c:649 __submit_bio_noacct_mq block/blk-core.c:722 [inline] submit_bio_noacct_nocheck+0x284/0xa98 block/blk-core.c:753 submit_bio_noacct+0xd90/0x1814 block/blk-core.c:884 submit_bio+0x38c/0x528 block/blk-core.c:926 blk_crypto_submit_bio include/linux/blk-crypto.h:203 [inline] submit_bh_wbc+0x4b0/0x594 fs/buffer.c:2737 submit_bh fs/buffer.c:2742 [inline] block_read_full_folio+0x468/0x734 fs/buffer.c:2344 blkdev_read_folio+0x28/0x38 block/fops.c:494 filemap_read_folio+0xf0/0x2fc mm/filemap.c:2502 do_read_cache_folio+0x368/0x5b8 mm/filemap.c:4107 read_cache_folio+0x68/0x84 mm/filemap.c:4139 read_mapping_folio include/linux/pagemap.h:1017 [inline] read_part_sector+0xcc/0x708 block/partitions/core.c:724 adfspart_check_ICS+0xa4/0x6fc block/partitions/acorn.c:356 check_partition block/partitions/core.c:143 [inline] blk_add_partitions block/partitions/core.c:591 [inline] bdev_disk_changed+0x6fc/0x11c8 block/partitions/core.c:695 blkdev_get_whole+0x15c/0x240 block/bdev.c:756 bdev_open+0x2d8/0x8cc block/bdev.c:965 blkdev_open+0x2d8/0x404 block/fops.c:697 do_dentry_open+0x5c4/0xfc8 fs/open.c:947 vfs_open+0x44/0x2d4 fs/open.c:1079 do_open fs/namei.c:4699 [inline] path_openat+0x2234/0x2a6c fs/namei.c:4858 do_file_open+0x1c4/0x2e4 fs/namei.c:4887 do_sys_openat2+0x114/0x1e8 fs/open.c:1364 do_sys_open+0xac/0xdc fs/open.c:1370 __do_sys_openat fs/open.c:1386 [inline] __se_sys_openat fs/open.c:1381 [inline] __arm64_sys_openat+0x9c/0xb8 fs/open.c:1381 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x244 arch/arm64/kernel/syscall.c:49 el0_svc_common+0xe8/0x23c arch/arm64/kernel/syscall.c:121 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:140 el0_svc+0x64/0x260 arch/arm64/kernel/entry-common.c:740 el0t_64_sync_handler+0x48/0x148 arch/arm64/kernel/entry-common.c:759 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:594 -> #4 (set->srcu){.+.+}-{0:0}: srcu_lock_sync include/linux/srcu.h:199 [inline] __synchronize_srcu+0xc8/0x268 kernel/rcu/srcutree.c:1481 synchronize_srcu+0x41c/0x604 kernel/rcu/srcutree.c:-1 blk_mq_wait_quiesce_done+0x88/0xb0 block/blk-mq.c:284 blk_mq_quiesce_queue+0x70/0x8c block/blk-mq.c:304 elevator_switch+0x128/0x384 block/elevator.c:576 elevator_change+0x200/0x358 block/elevator.c:681 elevator_set_default+0x190/0x2b0 block/elevator.c:754 blk_register_queue+0x2f8/0x3d0 block/blk-sysfs.c:987 __add_disk+0x568/0xb3c block/genhd.c:528 add_disk_fwnode+0xe8/0x42c block/genhd.c:597 device_add_disk+0x38/0x4c block/genhd.c:627 add_disk include/linux/blkdev.h:794 [inline] nbd_dev_add+0x588/0x85c drivers/block/nbd.c:1984 nbd_init+0x15c/0x174 drivers/block/nbd.c:2692 do_one_initcall+0x274/0xc20 init/main.c:1392 do_initcall_level+0x128/0x1c4 init/main.c:1454 do_initcalls+0x70/0xd0 init/main.c:1470 do_basic_setup+0x7c/0x90 init/main.c:1490 kernel_init_freeable+0x268/0x3a8 init/main.c:1703 kernel_init+0x24/0x1dc init/main.c:1593 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:842 -> #3 (&q->elevator_lock){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x160/0xef8 kernel/locking/mutex.c:820 mutex_lock_nested+0x24/0x30 kernel/locking/mutex.c:873 elevator_change+0x184/0x358 block/elevator.c:679 elevator_set_none+0xa8/0x13c block/elevator.c:769 blk_mq_elv_switch_none block/blk-mq.c:5150 [inline] __blk_mq_update_nr_hw_queues block/blk-mq.c:5195 [inline] blk_mq_update_nr_hw_queues+0x4ec/0x11fc block/blk-mq.c:5260 nbd_start_device+0x15c/0xa38 drivers/block/nbd.c:1489 nbd_genl_connect+0xfac/0x1564 drivers/block/nbd.c:2239 genl_family_rcv_msg_doit+0x1e4/0x2d8 net/netlink/genetlink.c:1114 genl_family_rcv_msg net/netlink/genetlink.c:1194 [inline] genl_rcv_msg+0x444/0x620 net/netlink/genetlink.c:1209 netlink_rcv_skb+0x22c/0x410 net/netlink/af_netlink.c:2550 genl_rcv+0x38/0x50 net/netlink/genetlink.c:1218 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x610/0x800 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x63c/0x920 net/netlink/af_netlink.c:1894 sock_sendmsg_nosec net/socket.c:787 [inline] __sock_sendmsg+0xc8/0x138 net/socket.c:802 ____sys_sendmsg+0x418/0x70c net/socket.c:2698 ___sys_sendmsg+0x198/0x224 net/socket.c:2752 __sys_sendmsg+0x160/0x214 net/socket.c:2784 __do_sys_sendmsg net/socket.c:2789 [inline] __se_sys_sendmsg net/socket.c:2787 [inline] __arm64_sys_sendmsg+0x80/0x94 net/socket.c:2787 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x244 arch/arm64/kernel/syscall.c:49 el0_svc_common+0xe8/0x23c arch/arm64/kernel/syscall.c:121 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:140 el0_svc+0x64/0x260 arch/arm64/kernel/entry-common.c:740 el0t_64_sync_handler+0x48/0x148 arch/arm64/kernel/entry-common.c:759 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:594 -> #2 (&q->q_usage_counter(io)#33){++++}-{0:0}: blk_alloc_queue+0x47c/0x57c block/blk-core.c:461 blk_mq_alloc_queue+0x148/0x294 block/blk-mq.c:4469 __blk_mq_alloc_disk+0x38/0x10c block/blk-mq.c:4516 nbd_dev_add+0x3c0/0x85c drivers/block/nbd.c:1954 nbd_init+0x15c/0x174 drivers/block/nbd.c:2692 do_one_initcall+0x274/0xc20 init/main.c:1392 do_initcall_level+0x128/0x1c4 init/main.c:1454 do_initcalls+0x70/0xd0 init/main.c:1470 do_basic_setup+0x7c/0x90 init/main.c:1490 kernel_init_freeable+0x268/0x3a8 init/main.c:1703 kernel_init+0x24/0x1dc init/main.c:1593 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:842 -> #1 (fs_reclaim){+.+.}-{0:0}: __fs_reclaim_acquire mm/page_alloc.c:4325 [inline] fs_reclaim_acquire+0x90/0x110 mm/page_alloc.c:4339 might_alloc include/linux/sched/mm.h:317 [inline] slab_pre_alloc_hook mm/slub.c:4520 [inline] slab_alloc_node mm/slub.c:4875 [inline] kmem_cache_alloc_node_noprof+0x60/0x6c8 mm/slub.c:4950 __alloc_skb+0x1f0/0x5f8 net/core/skbuff.c:702 alloc_skb_fclone include/linux/skbuff.h:1433 [inline] tcp_stream_alloc_skb+0x44/0x2d0 net/ipv4/tcp.c:935 tcp_sendmsg_locked+0xcfc/0x3250 net/ipv4/tcp.c:1260 tcp_sendmsg+0x40/0x64 net/ipv4/tcp.c:1455 inet_sendmsg+0xb4/0xd8 net/ipv4/af_inet.c:866 sock_sendmsg_nosec net/socket.c:787 [inline] __sock_sendmsg+0xc8/0x138 net/socket.c:802 sock_write_iter+0x23c/0x32c net/socket.c:1254 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x52c/0xa14 fs/read_write.c:688 ksys_write+0x12c/0x224 fs/read_write.c:740 __do_sys_write fs/read_write.c:751 [inline] __se_sys_write fs/read_write.c:748 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:748 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x244 arch/arm64/kernel/syscall.c:49 el0_svc_common+0xe8/0x23c arch/arm64/kernel/syscall.c:121 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:140 el0_svc+0x64/0x260 arch/arm64/kernel/entry-common.c:740 el0t_64_sync_handler+0x48/0x148 arch/arm64/kernel/entry-common.c:759 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:594 -> #0 (sk_lock-AF_INET){+.+.}-{0:0}: check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain kernel/locking/lockdep.c:3908 [inline] __lock_acquire+0x1780/0x2f44 kernel/locking/lockdep.c:5237 lock_acquire+0x140/0x368 kernel/locking/lockdep.c:5868 lock_sock_nested+0x58/0x110 net/core/sock.c:3783 lock_sock include/net/sock.h:1713 [inline] inet_shutdown+0x74/0x34c net/ipv4/af_inet.c:915 kernel_sock_shutdown+0x6c/0x80 net/socket.c:3785 nbd_mark_nsock_dead+0x27c/0x4f4 drivers/block/nbd.c:318 recv_work+0x1c40/0x1d54 drivers/block/nbd.c:1021 process_one_work kernel/workqueue.c:3314 [inline] process_scheduled_works+0x79c/0x1098 kernel/workqueue.c:3397 worker_thread+0x754/0xba0 kernel/workqueue.c:3478 kthread+0x2f8/0x3c8 kernel/kthread.c:436 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:842 other info that might help us debug this: Chain exists of: sk_lock-AF_INET --> &cmd->lock --> &nsock->tx_lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&nsock->tx_lock); lock(&cmd->lock); lock(&nsock->tx_lock); lock(sk_lock-AF_INET); *** DEADLOCK *** 3 locks held by kworker/u9:2/4708: #0: ffff0000c884a140 ((wq_completion)nbd9-recv){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3289 [inline] #0: ffff0000c884a140 ((wq_completion)nbd9-recv){+.+.}-{0:0}, at: process_scheduled_works+0x748/0x1098 kernel/workqueue.c:3397 #1: ffff800092b27c40 ((work_completion)(&args->work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3289 [inline] #1: ffff800092b27c40 ((work_completion)(&args->work)){+.+.}-{0:0}, at: process_scheduled_works+0x750/0x1098 kernel/workqueue.c:3397 #2: ffff00011e4fa668 (&nsock->tx_lock){+.+.}-{4:4}, at: recv_work+0x1c30/0x1d54 drivers/block/nbd.c:1020 stack backtrace: CPU: 0 UID: 0 PID: 4708 Comm: kworker/u9:2 Tainted: G L syzkaller #0 PREEMPT Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026 Workqueue: nbd9-recv recv_work Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 print_circular_bug+0x328/0x330 kernel/locking/lockdep.c:2043 check_noncircular+0x158/0x174 kernel/locking/lockdep.c:2175 check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain kernel/locking/lockdep.c:3908 [inline] __lock_acquire+0x1780/0x2f44 kernel/locking/lockdep.c:5237 lock_acquire+0x140/0x368 kernel/locking/lockdep.c:5868 lock_sock_nested+0x58/0x110 net/core/sock.c:3783 lock_sock include/net/sock.h:1713 [inline] inet_shutdown+0x74/0x34c net/ipv4/af_inet.c:915 kernel_sock_shutdown+0x6c/0x80 net/socket.c:3785 nbd_mark_nsock_dead+0x27c/0x4f4 drivers/block/nbd.c:318 recv_work+0x1c40/0x1d54 drivers/block/nbd.c:1021 process_one_work kernel/workqueue.c:3314 [inline] process_scheduled_works+0x79c/0x1098 kernel/workqueue.c:3397 worker_thread+0x754/0xba0 kernel/workqueue.c:3478 kthread+0x2f8/0x3c8 kernel/kthread.c:436 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:842 ------------[ cut here ]------------ WARNING: net/bluetooth/hci_conn.c:634 at hci_conn_timeout+0xf4/0x20c net/bluetooth/hci_conn.c:634, CPU#1: kworker/u9:2/4708 Modules linked in: CPU: 1 UID: 0 PID: 4708 Comm: kworker/u9:2 Tainted: G L syzkaller #0 PREEMPT Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026 Workqueue: hci3 hci_conn_timeout pstate: 83400005 (Nzcv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--) pc : hci_conn_timeout+0xf4/0x20c net/bluetooth/hci_conn.c:634 lr : hci_conn_timeout+0xf4/0x20c net/bluetooth/hci_conn.c:634 sp : ffff800092b27af0 x29: ffff800092b27af0 x28: ffff800092b27c40 x27: 0000000000000000 x26: ffff0000c2565518 x25: dfff800000000000 x24: ffff700012564f84 x23: ffff0000d4523e84 x22: dfff800000000000 x21: 00000000ffffffff x20: ffff0000f33f0a40 x19: ffff0000f33f0000 x18: 1fffe00035c0cc20 x17: ffff80008897b000 x16: ffff800088a2dba0 x15: ffff0001ae06610c x14: ffff0001ae066108 x13: 0000000000000001 x12: 0000000000000000 x11: 0000000000000000 x10: 0000000000ff0100 x9 : 0000000000000000 x8 : 0000000000000000 x7 : 0000000000000000 x6 : ffff80008035ea04 x5 : 0000000000000000 x4 : 0000000000000001 x3 : ffff800085a155f0 x2 : 00000000ffffffff x1 : ffff0000d4523a00 x0 : 0000000000000000 Call trace: hci_conn_timeout+0xf4/0x20c net/bluetooth/hci_conn.c:634 (P) process_one_work kernel/workqueue.c:3314 [inline] process_scheduled_works+0x79c/0x1098 kernel/workqueue.c:3397 worker_thread+0x754/0xba0 kernel/workqueue.c:3478 kthread+0x2f8/0x3c8 kernel/kthread.c:436 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:842 irq event stamp: 14689 hardirqs last enabled at (14689): [] irqentry_exit_to_kernel_mode_after_preempt include/linux/irq-entry-common.h:507 [inline] hardirqs last enabled at (14689): [] arm64_exit_to_kernel_mode+0x80/0x94 arch/arm64/kernel/entry-common.c:62 hardirqs last disabled at (14688): [] __el1_irq arch/arm64/kernel/entry-common.c:510 [inline] hardirqs last disabled at (14688): [] el1_interrupt+0x28/0x60 arch/arm64/kernel/entry-common.c:526 softirqs last enabled at (14676): [] spin_unlock_bh include/linux/spinlock.h:396 [inline] softirqs last enabled at (14676): [] release_sock+0x150/0x228 net/core/sock.c:3825 softirqs last disabled at (14674): [] spin_lock_bh include/linux/spinlock.h:348 [inline] softirqs last disabled at (14674): [] release_sock+0x34/0x228 net/core/sock.c:3812 ---[ end trace 0000000000000000 ]--- Bluetooth: hci3: command 0x0406 tx timeout