Warning: Permanently added '10.128.0.77' (ECDSA) to the list of known hosts. executing program [ 161.142909][ T4330] nci: __nci_request: wait_for_completion_interruptible_timeout failed -512 [ 161.144881][ T4330] nci: nci_start_poll: failed to set local general bytes [ 166.195586][ T4330] nci: __nci_request: wait_for_completion_interruptible_timeout failed 0 [ 166.197620][ T4330] [ 166.198140][ T4330] ====================================================== [ 166.199629][ T4330] WARNING: possible circular locking dependency detected [ 166.201123][ T4330] 6.1.21-syzkaller #0 Not tainted [ 166.202177][ T4330] ------------------------------------------------------ [ 166.203708][ T4330] syz-executor226/4330 is trying to acquire lock: [ 166.205078][ T4330] ffff800016bc5d08 (nci_mutex){+.+.}-{3:3}, at: virtual_nci_close+0x28/0x58 [ 166.207047][ T4330] [ 166.207047][ T4330] but task is already holding lock: [ 166.208582][ T4330] ffff0000c2693350 (&ndev->req_lock){+.+.}-{3:3}, at: nci_close_device+0xf0/0x5ac [ 166.210661][ T4330] [ 166.210661][ T4330] which lock already depends on the new lock. [ 166.210661][ T4330] [ 166.212852][ T4330] [ 166.212852][ T4330] the existing dependency chain (in reverse order) is: [ 166.214794][ T4330] [ 166.214794][ T4330] -> #3 (&ndev->req_lock){+.+.}-{3:3}: [ 166.216459][ T4330] __mutex_lock_common+0x190/0x21a0 [ 166.217716][ T4330] mutex_lock_nested+0x38/0x44 [ 166.218891][ T4330] nci_start_poll+0x498/0x1204 [ 166.220070][ T4330] nfc_start_poll+0x164/0x2a4 [ 166.221215][ T4330] nfc_genl_start_poll+0x1b8/0x308 [ 166.222479][ T4330] genl_rcv_msg+0x948/0xc2c [ 166.223533][ T4330] netlink_rcv_skb+0x20c/0x3b8 [ 166.224675][ T4330] genl_rcv+0x38/0x50 [ 166.225640][ T4330] netlink_unicast+0x660/0x8d4 [ 166.226829][ T4330] netlink_sendmsg+0x834/0xb18 [ 166.227958][ T4330] ____sys_sendmsg+0x558/0x844 [ 166.229069][ T4330] __sys_sendmsg+0x26c/0x33c [ 166.230175][ T4330] __arm64_sys_sendmsg+0x80/0x94 [ 166.231337][ T4330] invoke_syscall+0x98/0x2c0 [ 166.232436][ T4330] el0_svc_common+0x138/0x258 [ 166.233586][ T4330] do_el0_svc+0x64/0x218 [ 166.234603][ T4330] el0_svc+0x58/0x168 [ 166.235520][ T4330] el0t_64_sync_handler+0x84/0xf0 [ 166.236738][ T4330] el0t_64_sync+0x18c/0x190 [ 166.237790][ T4330] [ 166.237790][ T4330] -> #2 (&genl_data->genl_data_mutex){+.+.}-{3:3}: [ 166.239704][ T4330] __mutex_lock_common+0x190/0x21a0 [ 166.240965][ T4330] mutex_lock_nested+0x38/0x44 [ 166.242128][ T4330] nfc_urelease_event_work+0xfc/0x2a8 [ 166.243347][ T4330] process_one_work+0x7ac/0x1404 [ 166.244532][ T4330] worker_thread+0x8e4/0xfec [ 166.245614][ T4330] kthread+0x24c/0x2d4 [ 166.246590][ T4330] ret_from_fork+0x10/0x20 [ 166.247601][ T4330] [ 166.247601][ T4330] -> #1 (nfc_devlist_mutex){+.+.}-{3:3}: [ 166.249331][ T4330] __mutex_lock_common+0x190/0x21a0 [ 166.250579][ T4330] mutex_lock_nested+0x38/0x44 [ 166.251694][ T4330] nfc_register_device+0x4c/0x310 [ 166.252835][ T4330] nci_register_device+0x6ac/0x7c4 [ 166.254016][ T4330] virtual_ncidev_open+0x6c/0xd8 [ 166.255139][ T4330] misc_open+0x2f0/0x368 [ 166.256161][ T4330] chrdev_open+0x3e8/0x4fc [ 166.257328][ T4330] do_dentry_open+0x734/0xfa0 [ 166.258481][ T4330] vfs_open+0x7c/0x90 [ 166.259461][ T4330] path_openat+0x1e14/0x2548 [ 166.260541][ T4330] do_filp_open+0x1bc/0x3cc [ 166.261599][ T4330] do_sys_openat2+0x128/0x3d8 [ 166.262699][ T4330] __arm64_sys_openat+0x1f0/0x240 [ 166.263869][ T4330] invoke_syscall+0x98/0x2c0 [ 166.264938][ T4330] el0_svc_common+0x138/0x258 [ 166.266117][ T4330] do_el0_svc+0x64/0x218 [ 166.267138][ T4330] el0_svc+0x58/0x168 [ 166.268120][ T4330] el0t_64_sync_handler+0x84/0xf0 [ 166.269282][ T4330] el0t_64_sync+0x18c/0x190 [ 166.270348][ T4330] [ 166.270348][ T4330] -> #0 (nci_mutex){+.+.}-{3:3}: [ 166.271898][ T4330] __lock_acquire+0x3338/0x764c [ 166.273050][ T4330] lock_acquire+0x26c/0x7cc [ 166.274097][ T4330] __mutex_lock_common+0x190/0x21a0 [ 166.275310][ T4330] mutex_lock_nested+0x38/0x44 [ 166.276440][ T4330] virtual_nci_close+0x28/0x58 [ 166.277561][ T4330] nci_close_device+0x2fc/0x5ac [ 166.278745][ T4330] nci_unregister_device+0x58/0x21c [ 166.280059][ T4330] virtual_ncidev_close+0x70/0xb0 [ 166.281221][ T4330] __fput+0x30c/0x7bc [ 166.282155][ T4330] ____fput+0x20/0x30 [ 166.283164][ T4330] task_work_run+0x240/0x2f0 [ 166.284259][ T4330] do_exit+0x554/0x1a88 [ 166.285269][ T4330] do_group_exit+0x194/0x22c [ 166.286338][ T4330] get_signal+0x14a0/0x158c [ 166.287423][ T4330] do_notify_resume+0x3ac/0x3470 [ 166.288626][ T4330] el0_svc+0x9c/0x168 [ 166.289652][ T4330] el0t_64_sync_handler+0x84/0xf0 [ 166.290842][ T4330] el0t_64_sync+0x18c/0x190 [ 166.291894][ T4330] [ 166.291894][ T4330] other info that might help us debug this: [ 166.291894][ T4330] [ 166.294058][ T4330] Chain exists of: [ 166.294058][ T4330] nci_mutex --> &genl_data->genl_data_mutex --> &ndev->req_lock [ 166.294058][ T4330] [ 166.296924][ T4330] Possible unsafe locking scenario: [ 166.296924][ T4330] [ 166.298534][ T4330] CPU0 CPU1 [ 166.299693][ T4330] ---- ---- [ 166.300765][ T4330] lock(&ndev->req_lock); [ 166.301733][ T4330] lock(&genl_data->genl_data_mutex); [ 166.303454][ T4330] lock(&ndev->req_lock); [ 166.304972][ T4330] lock(nci_mutex); [ 166.305817][ T4330] [ 166.305817][ T4330] *** DEADLOCK *** [ 166.305817][ T4330] [ 166.307617][ T4330] 1 lock held by syz-executor226/4330: [ 166.308799][ T4330] #0: ffff0000c2693350 (&ndev->req_lock){+.+.}-{3:3}, at: nci_close_device+0xf0/0x5ac [ 166.310863][ T4330] [ 166.310863][ T4330] stack backtrace: [ 166.312108][ T4330] CPU: 0 PID: 4330 Comm: syz-executor226 Not tainted 6.1.21-syzkaller #0 [ 166.313876][ T4330] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 [ 166.315973][ T4330] Call trace: [ 166.316687][ T4330] dump_backtrace+0x1c8/0x1f4 [ 166.317739][ T4330] show_stack+0x2c/0x3c [ 166.318625][ T4330] dump_stack_lvl+0x108/0x170 [ 166.319549][ T4330] dump_stack+0x1c/0x5c [ 166.320464][ T4330] print_circular_bug+0x150/0x1b8 [ 166.321672][ T4330] check_noncircular+0x2cc/0x378 [ 166.322514][ T4330] __lock_acquire+0x3338/0x764c [ 166.323539][ T4330] lock_acquire+0x26c/0x7cc [ 166.324485][ T4330] __mutex_lock_common+0x190/0x21a0 [ 166.325682][ T4330] mutex_lock_nested+0x38/0x44 [ 166.326716][ T4330] virtual_nci_close+0x28/0x58 [ 166.327751][ T4330] nci_close_device+0x2fc/0x5ac [ 166.328835][ T4330] nci_unregister_device+0x58/0x21c [ 166.329983][ T4330] virtual_ncidev_close+0x70/0xb0 [ 166.331036][ T4330] __fput+0x30c/0x7bc [ 166.331857][ T4330] ____fput+0x20/0x30 [ 166.332772][ T4330] task_work_run+0x240/0x2f0 [ 166.333758][ T4330] do_exit+0x554/0x1a88 [ 166.334654][ T4330] do_group_exit+0x194/0x22c [ 166.335632][ T4330] get_signal+0x14a0/0x158c [ 166.336560][ T4330] do_notify_resume+0x3ac/0x3470 [ 166.337616][ T4330] el0_svc+0x9c/0x168 [ 166.338443][ T4330] el0t_64_sync_handler+0x84/0xf0 [ 166.339530][ T4330] el0t_64_sync+0x18c/0x190 executing program [ 166.563418][ T4334] nci: __nci_request: wait_for_completion_interruptible_timeout failed -512 [ 166.565312][ T4334] nci: nci_start_poll: failed to set local general bytes [ 171.635487][ T4334] nci: __nci_request: wait_for_completion_interruptible_timeout failed 0 executing program [ 171.853147][ T4346] nci: __nci_request: wait_for_completion_interruptible_timeout failed -512 [ 171.855108][ T4346] nci: nci_start_poll: failed to set local general bytes