nci: __nci_request: wait_for_completion_interruptible_timeout failed -512 ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.4.62/4658 is trying to acquire lock: ffff800016a1a408 (nci_mutex){+.+.}-{3:3}, at: virtual_nci_close+0x28/0x58 drivers/nfc/virtual_ncidev.c:44 but task is already holding lock: ffff0000f6971350 (&ndev->req_lock){+.+.}-{3:3}, at: nci_close_device+0xe8/0x57c net/nfc/nci/core.c:560 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&ndev->req_lock){+.+.}-{3:3}: __mutex_lock_common+0x1a0/0x1f3c kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799 nci_request net/nfc/nci/core.c:148 [inline] nci_start_poll+0x71c/0xaa0 net/nfc/nci/core.c:855 nfc_start_poll+0x124/0x284 net/nfc/core.c:225 nfc_genl_start_poll+0x1b0/0x2f4 net/nfc/netlink.c:828 genl_family_rcv_msg_doit+0x210/0x308 net/netlink/genetlink.c:756 genl_family_rcv_msg net/netlink/genetlink.c:833 [inline] genl_rcv_msg+0x424/0x600 net/netlink/genetlink.c:850 netlink_rcv_skb+0x220/0x3ec net/netlink/af_netlink.c:2516 genl_rcv+0x38/0x50 net/netlink/genetlink.c:861 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x5fc/0x80c net/netlink/af_netlink.c:1344 netlink_sendmsg+0x6f0/0x9d8 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:730 [inline] ____sys_sendmsg+0x588/0x90c net/socket.c:2519 ___sys_sendmsg net/socket.c:2573 [inline] __sys_sendmsg+0x288/0x374 net/socket.c:2602 __do_sys_sendmsg net/socket.c:2611 [inline] __se_sys_sendmsg net/socket.c:2609 [inline] __arm64_sys_sendmsg+0x80/0x94 net/socket.c:2609 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x13c/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x5c/0x134 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 -> #2 (&genl_data->genl_data_mutex){+.+.}-{3:3}: __mutex_lock_common+0x1a0/0x1f3c kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799 nfc_urelease_event_work+0x108/0x2b8 net/nfc/netlink.c:1849 process_one_work+0x7e4/0x13bc kernel/workqueue.c:2292 worker_thread+0x8cc/0xfe8 kernel/workqueue.c:2439 kthread+0x254/0x2e0 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:850 -> #1 (nfc_devlist_mutex){+.+.}-{3:3}: __mutex_lock_common+0x1a0/0x1f3c kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799 nfc_register_device+0x48/0x300 net/nfc/core.c:1116 nci_register_device+0x6b8/0x7e4 net/nfc/nci/core.c:1272 virtual_ncidev_open+0x6c/0xd8 drivers/nfc/virtual_ncidev.c:146 misc_open+0x310/0x388 drivers/char/misc.c:145 chrdev_open+0x3d0/0x51c fs/char_dev.c:414 do_dentry_open+0x738/0xf8c fs/open.c:882 vfs_open+0x7c/0x90 fs/open.c:1015 do_open fs/namei.c:3634 [inline] path_openat+0x1fc0/0x27a0 fs/namei.c:3791 do_filp_open+0x198/0x38c fs/namei.c:3818 do_sys_openat2+0x134/0x3fc fs/open.c:1320 do_sys_open fs/open.c:1336 [inline] __do_sys_openat fs/open.c:1352 [inline] __se_sys_openat fs/open.c:1347 [inline] __arm64_sys_openat+0x11c/0x150 fs/open.c:1347 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x13c/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x5c/0x134 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 -> #0 (nci_mutex){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3095 [inline] check_prevs_add kernel/locking/lockdep.c:3214 [inline] validate_chain kernel/locking/lockdep.c:3830 [inline] __lock_acquire+0x2808/0x6634 kernel/locking/lockdep.c:5063 lock_acquire+0x20c/0x638 kernel/locking/lockdep.c:5676 __mutex_lock_common+0x1a0/0x1f3c kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799 virtual_nci_close+0x28/0x58 drivers/nfc/virtual_ncidev.c:44 nci_close_device+0x2e4/0x57c net/nfc/nci/core.c:591 nci_unregister_device+0x78/0x258 net/nfc/nci/core.c:1309 virtual_ncidev_close+0x70/0xb0 drivers/nfc/virtual_ncidev.c:166 __fput+0x1b4/0x7b0 fs/file_table.c:320 ____fput+0x20/0x30 fs/file_table.c:348 task_work_run+0x1f4/0x280 kernel/task_work.c:203 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] do_notify_resume+0x20f8/0x2c84 arch/arm64/kernel/signal.c:1151 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline] el0_svc+0x98/0x128 arch/arm64/kernel/entry-common.c:638 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 other info that might help us debug this: Chain exists of: nci_mutex --> &genl_data->genl_data_mutex --> &ndev->req_lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ndev->req_lock); lock(&genl_data->genl_data_mutex); lock(&ndev->req_lock); lock(nci_mutex); *** DEADLOCK *** 1 lock held by syz.4.62/4658: #0: ffff0000f6971350 (&ndev->req_lock){+.+.}-{3:3}, at: nci_close_device+0xe8/0x57c net/nfc/nci/core.c:560 stack backtrace: CPU: 0 PID: 4658 Comm: syz.4.62 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/02/2026 Call trace: dump_backtrace+0x1c4/0x1f0 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack+0x30/0x40 lib/dump_stack.c:88 dump_stack_lvl+0xf4/0x15c lib/dump_stack.c:106 dump_stack+0x1c/0x5c lib/dump_stack.c:113 print_circular_bug+0x148/0x1b0 kernel/locking/lockdep.c:2048 check_noncircular+0x264/0x2f8 kernel/locking/lockdep.c:2170 check_prev_add kernel/locking/lockdep.c:3095 [inline] check_prevs_add kernel/locking/lockdep.c:3214 [inline] validate_chain kernel/locking/lockdep.c:3830 [inline] __lock_acquire+0x2808/0x6634 kernel/locking/lockdep.c:5063 lock_acquire+0x20c/0x638 kernel/locking/lockdep.c:5676 __mutex_lock_common+0x1a0/0x1f3c kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799 virtual_nci_close+0x28/0x58 drivers/nfc/virtual_ncidev.c:44 nci_close_device+0x2e4/0x57c net/nfc/nci/core.c:591 nci_unregister_device+0x78/0x258 net/nfc/nci/core.c:1309 virtual_ncidev_close+0x70/0xb0 drivers/nfc/virtual_ncidev.c:166 __fput+0x1b4/0x7b0 fs/file_table.c:320 ____fput+0x20/0x30 fs/file_table.c:348 task_work_run+0x1f4/0x280 kernel/task_work.c:203 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] do_notify_resume+0x20f8/0x2c84 arch/arm64/kernel/signal.c:1151 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline] el0_svc+0x98/0x128 arch/arm64/kernel/entry-common.c:638 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585