syzbot


INFO: task hung in nci_close_device

Status: auto-obsoleted due to no activity on 2023/08/19 18:29
Reported-by: syzbot+4f377ad88c3e427730ac@syzkaller.appspotmail.com
First crash: 379d, last: 379d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in nci_close_device net nfc 3 372d 451d 0/26 auto-obsoleted due to no activity on 2023/07/27 04:59

Sample crash report:
INFO: task kworker/1:3:25741 blocked for more than 143 seconds.
      Not tainted 6.1.25-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/1:3     state:D stack:22688 pid:25741 ppid:2      flags:0x00004000
Workqueue: events rfkill_sync_work
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0x132c/0x4330 kernel/sched/core.c:6554
 schedule+0xbf/0x180 kernel/sched/core.c:6630
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6689
 __mutex_lock_common+0xe2b/0x2520 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799
 nci_close_device+0x106/0x5f0 net/nfc/nci/core.c:560
 nci_dev_down+0x37/0x40 net/nfc/nci/core.c:638
 nfc_dev_down net/nfc/core.c:161 [inline]
 nfc_rfkill_set_block+0x16d/0x2f0 net/nfc/core.c:179
 rfkill_set_block+0x1e7/0x430 net/rfkill/core.c:345
 rfkill_sync_work+0x8a/0xe0 net/rfkill/core.c:1042
 process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2289
 worker_thread+0xa5f/0x1210 kernel/workqueue.c:2436
 kthread+0x268/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
 </TASK>
INFO: task kworker/1:4:27360 blocked for more than 143 seconds.
      Not tainted 6.1.25-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/1:4     state:D stack:25216 pid:27360 ppid:2      flags:0x00004000
Workqueue: events rfkill_global_led_trigger_worker
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0x132c/0x4330 kernel/sched/core.c:6554
 schedule+0xbf/0x180 kernel/sched/core.c:6630
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6689
 __mutex_lock_common+0xe2b/0x2520 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799
 rfkill_global_led_trigger_worker+0x23/0xd0 net/rfkill/core.c:181
 process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2289
 worker_thread+0xa5f/0x1210 kernel/workqueue.c:2436
 kthread+0x268/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
 </TASK>
INFO: task kworker/u4:82:30084 blocked for more than 143 seconds.
      Not tainted 6.1.25-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u4:82   state:D stack:25440 pid:30084 ppid:2      flags:0x00004000
Workqueue: nfc2_nci_rx_wq nci_rx_work
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0x132c/0x4330 kernel/sched/core.c:6554
 schedule+0xbf/0x180 kernel/sched/core.c:6630
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6689
 __mutex_lock_common+0xe2b/0x2520 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799
 device_lock include/linux/device.h:836 [inline]
 nfc_targets_found+0x26b/0x580 net/nfc/core.c:778
 nci_ntf_packet+0x42e4/0x4db0
 nci_rx_work+0xf7/0x260 net/nfc/nci/core.c:1513
 process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2289
 worker_thread+0xa5f/0x1210 kernel/workqueue.c:2436
 kthread+0x268/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
 </TASK>
INFO: task syz-executor.5:30560 blocked for more than 144 seconds.
      Not tainted 6.1.25-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.5  state:D stack:25008 pid:30560 ppid:3669   flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0x132c/0x4330 kernel/sched/core.c:6554
 schedule+0xbf/0x180 kernel/sched/core.c:6630
 schedule_timeout+0xac/0x300 kernel/time/timer.c:1911
 do_wait_for_common+0x441/0x5e0 kernel/sched/completion.c:85
 __wait_for_common kernel/sched/completion.c:106 [inline]
 wait_for_common kernel/sched/completion.c:117 [inline]
 wait_for_completion+0x46/0x60 kernel/sched/completion.c:138
 __flush_workqueue+0x737/0x1610 kernel/workqueue.c:2861
 nci_close_device+0x185/0x5f0 net/nfc/nci/core.c:578
 nci_unregister_device+0x3c/0x230 net/nfc/nci/core.c:1291
 virtual_ncidev_close+0x55/0x90 drivers/nfc/virtual_ncidev.c:166
 __fput+0x3b7/0x890 fs/file_table.c:320
 task_work_run+0x246/0x300 kernel/task_work.c:179
 get_signal+0x15fc/0x17d0 kernel/signal.c:2635
 arch_do_signal_or_restart+0xb0/0x1a10 arch/x86/kernel/signal.c:869
 exit_to_user_mode_loop+0x6a/0x100 kernel/entry/common.c:168
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204
 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline]
 syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:297
 do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7efcc008c169
RSP: 002b:00007efcc0db0168 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: fffffffffffffff2 RBX: 00007efcc01abf80 RCX: 00007efcc008c169
RDX: 0000000000000064 RSI: 0000000020000840 RDI: 0000000000000003
RBP: 00007efcc00e7ca1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fff2599380f R14: 00007efcc0db0300 R15: 0000000000022000
 </TASK>
INFO: task syz-executor.5:30573 blocked for more than 144 seconds.
      Not tainted 6.1.25-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.5  state:D stack:26624 pid:30573 ppid:3669   flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0x132c/0x4330 kernel/sched/core.c:6554
 schedule+0xbf/0x180 kernel/sched/core.c:6630
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6689
 __mutex_lock_common+0xe2b/0x2520 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799
 device_lock include/linux/device.h:836 [inline]
 nfc_deactivate_target+0x41/0x2e0 net/nfc/core.c:449
 nfc_genl_activate_target+0x16c/0x220 net/nfc/netlink.c:899
 genl_family_rcv_msg_doit net/netlink/genetlink.c:756 [inline]
 genl_family_rcv_msg net/netlink/genetlink.c:833 [inline]
 genl_rcv_msg+0xc1a/0xf70 net/netlink/genetlink.c:850
 netlink_rcv_skb+0x1cd/0x410 net/netlink/af_netlink.c:2553
 genl_rcv+0x24/0x40 net/netlink/genetlink.c:861
 netlink_unicast_kernel net/netlink/af_netlink.c:1328 [inline]
 netlink_unicast+0x7bf/0x990 net/netlink/af_netlink.c:1354
 netlink_sendmsg+0xa26/0xd60 net/netlink/af_netlink.c:1931
 sock_sendmsg_nosec net/socket.c:716 [inline]
 sock_sendmsg net/socket.c:736 [inline]
 ____sys_sendmsg+0x59e/0x8f0 net/socket.c:2482
 ___sys_sendmsg net/socket.c:2536 [inline]
 __sys_sendmsg+0x2a9/0x390 net/socket.c:2565
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7efcc008c169
RSP: 002b:00007efcc0d6e168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007efcc01ac120 RCX: 00007efcc008c169
RDX: 0000000000000000 RSI: 0000000020000780 RDI: 0000000000000005
RBP: 00007efcc00e7ca1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fff2599380f R14: 00007efcc0d6e300 R15: 0000000000022000
 </TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
 #0: ffffffff8cf26870 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xd20 kernel/rcu/tasks.h:510
1 lock held by rcu_tasks_trace/13:
 #0: ffffffff8cf27070 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xd20 kernel/rcu/tasks.h:510
1 lock held by khungtaskd/28:
 #0: ffffffff8cf266a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
1 lock held by klogd/2987:
 #0: ffff8880b9939dd8 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:537
2 locks held by getty/3318:
 #0: ffff88814b249098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
 #1: ffffc900031262f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6a7/0x1db0 drivers/tty/n_tty.c:2177
2 locks held by kworker/u4:3/18126:
5 locks held by kworker/1:3/25741:
 #0: ffff888012464d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x77a/0x11f0
 #1: ffffc9000e9ffd20 ((work_completion)(&rfkill->sync_work)){+.+.}-{0:0}, at: process_one_work+0x7bd/0x11f0 kernel/workqueue.c:2264
 #2: ffffffff8e338dc8 (rfkill_global_mutex){+.+.}-{3:3}, at: rfkill_sync_work+0x25/0xe0 net/rfkill/core.c:1040
 #3: ffff888017df6100 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:836 [inline]
 #3: ffff888017df6100 (&dev->mutex){....}-{3:3}, at: nfc_dev_down net/nfc/core.c:143 [inline]
 #3: ffff888017df6100 (&dev->mutex){....}-{3:3}, at: nfc_rfkill_set_block+0x4c/0x2f0 net/nfc/core.c:179
 #4: ffff888017df3350 (&ndev->req_lock){+.+.}-{3:3}, at: nci_close_device+0x106/0x5f0 net/nfc/nci/core.c:560
3 locks held by kworker/1:4/27360:
 #0: ffff888012464d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x77a/0x11f0
 #1: ffffc90003befd20 ((work_completion)(&rfkill_global_led_trigger_work)){+.+.}-{0:0}, at: process_one_work+0x7bd/0x11f0 kernel/workqueue.c:2264
 #2: ffffffff8e338dc8 (rfkill_global_mutex){+.+.}-{3:3}, at: rfkill_global_led_trigger_worker+0x23/0xd0 net/rfkill/core.c:181
3 locks held by kworker/u4:82/30084:
 #0: ffff88807ae9d938 ((wq_completion)nfc2_nci_rx_wq){+.+.}-{0:0}, at: process_one_work+0x77a/0x11f0
 #1: ffffc9001994fd20 ((work_completion)(&ndev->rx_work)){+.+.}-{0:0}, at: process_one_work+0x7bd/0x11f0 kernel/workqueue.c:2264
 #2: ffff888017df6100 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:836 [inline]
 #2: ffff888017df6100 (&dev->mutex){....}-{3:3}, at: nfc_targets_found+0x26b/0x580 net/nfc/core.c:778
1 lock held by syz-executor.5/30560:
 #0: ffff888017df3350 (&ndev->req_lock){+.+.}-{3:3}, at: nci_close_device+0x106/0x5f0 net/nfc/nci/core.c:560
3 locks held by syz-executor.5/30573:
 #0: ffffffff8e0f10d0 (cb_lock){++++}-{3:3}, at: genl_rcv+0x15/0x40 net/netlink/genetlink.c:860
 #1: ffffffff8e0f0f88 (genl_mutex){+.+.}-{3:3}, at: genl_lock net/netlink/genetlink.c:33 [inline]
 #1: ffffffff8e0f0f88 (genl_mutex){+.+.}-{3:3}, at: genl_rcv_msg+0x125/0xf70 net/netlink/genetlink.c:848
 #2: ffff888017df6100 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:836 [inline]
 #2: ffff888017df6100 (&dev->mutex){....}-{3:3}, at: nfc_deactivate_target+0x41/0x2e0 net/nfc/core.c:449
2 locks held by syz-executor.2/30629:
 #0: ffffffff8e0f10d0 (cb_lock){++++}-{3:3}, at: genl_rcv+0x15/0x40 net/netlink/genetlink.c:860
 #1: ffffffff8e0f0f88 (genl_mutex){+.+.}-{3:3}, at: genl_lock net/netlink/genetlink.c:33 [inline]
 #1: ffffffff8e0f0f88 (genl_mutex){+.+.}-{3:3}, at: genl_rcv_msg+0x125/0xf70 net/netlink/genetlink.c:848
2 locks held by syz-executor.0/30641:
 #0: ffffffff8e0f10d0 (cb_lock){++++}-{3:3}, at: genl_rcv+0x15/0x40 net/netlink/genetlink.c:860
 #1: ffffffff8e0f0f88 (genl_mutex){+.+.}-{3:3}, at: genl_lock net/netlink/genetlink.c:33 [inline]
 #1: ffffffff8e0f0f88 (genl_mutex){+.+.}-{3:3}, at: genl_rcv_msg+0x125/0xf70 net/netlink/genetlink.c:848
2 locks held by syz-executor.4/30660:
 #0: ffffffff8e0f10d0 (cb_lock){++++}-{3:3}, at: genl_rcv+0x15/0x40 net/netlink/genetlink.c:860
 #1: ffffffff8e0f0f88 (genl_mutex){+.+.}-{3:3}, at: genl_lock net/netlink/genetlink.c:33 [inline]
 #1: ffffffff8e0f0f88 (genl_mutex){+.+.}-{3:3}, at: genl_rcv_msg+0x125/0xf70 net/netlink/genetlink.c:848
2 locks held by syz-executor.3/30664:
 #0: ffffffff8e0f10d0 (cb_lock){++++}-{3:3}, at: genl_rcv+0x15/0x40 net/netlink/genetlink.c:860
 #1: ffffffff8e0f0f88 (genl_mutex){+.+.}-{3:3}, at: genl_lock net/netlink/genetlink.c:33 [inline]
 #1: ffffffff8e0f0f88 (genl_mutex){+.+.}-{3:3}, at: genl_rcv_msg+0x125/0xf70 net/netlink/genetlink.c:848
2 locks held by syz-executor.5/30667:
 #0: ffff888080dc6118 (&data->open_mutex){+.+.}-{3:3}, at: vhci_create_device+0x34/0x6f0 drivers/bluetooth/hci_vhci.c:373
 #1: ffffffff8e338dc8 (rfkill_global_mutex){+.+.}-{3:3}, at: rfkill_register+0x30/0x880 net/rfkill/core.c:1057
2 locks held by syz-executor.5/30673:
 #0: ffff888020f54118 (&data->open_mutex){+.+.}-{3:3}, at: vhci_create_device+0x34/0x6f0 drivers/bluetooth/hci_vhci.c:373
 #1: ffffffff8e338dc8 (rfkill_global_mutex){+.+.}-{3:3}, at: rfkill_register+0x30/0x880 net/rfkill/core.c:1057

=============================================

NMI backtrace for cpu 0
CPU: 0 PID: 28 Comm: khungtaskd Not tainted 6.1.25-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 nmi_cpu_backtrace+0x4e1/0x560 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x1b0/0x3f0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:220 [inline]
 watchdog+0xf18/0xf60 kernel/hung_task.c:377
 kthread+0x268/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 29903 Comm: kworker/u4:41 Not tainted 6.1.25-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023
Workqueue: events_unbound toggle_allocation_gate
RIP: 0010:insn_get_opcode+0x0/0xa50 arch/x86/lib/insn.c:263
Code: e9 9b fa ff ff 48 8b 4c 24 10 80 e1 07 38 c1 0f 8c c2 fa ff ff 48 8b 7c 24 10 e8 5b 19 64 f7 e9 b3 fa ff ff 66 0f 1f 44 00 00 <55> 41 57 41 56 41 55 41 54 53 48 81 ec 88 00 00 00 49 89 fc 49 bd
RSP: 0018:ffffc900173a7798 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff88803b3cba80
RDX: ffff88803b3cba80 RSI: 0000000000000000 RDI: ffffc900173a7980
RBP: 0000000000000000 R08: ffffffff8a7bab2c R09: ffffc900173a7980
R10: 0000000000000000 R11: dffffc0000000001 R12: ffffc900173a7980
R13: 1ffff92002e74f34 R14: ffffc900173a79a4 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000c004ecf000 CR3: 000000000cc8e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 insn_get_modrm+0x22a/0x790 arch/x86/lib/insn.c:343
 insn_get_sib arch/x86/lib/insn.c:421 [inline]
 insn_get_displacement+0x13a/0x970 arch/x86/lib/insn.c:464
 insn_get_immediate+0x458/0x1390 arch/x86/lib/insn.c:632
 insn_get_length arch/x86/lib/insn.c:707 [inline]
 insn_decode+0x36c/0x500 arch/x86/lib/insn.c:747
 text_poke_loc_init+0xd2/0x680 arch/x86/kernel/alternative.c:1620
 arch_jump_label_transform_queue+0x71/0xd0 arch/x86/kernel/jump_label.c:138
 __jump_label_update+0x177/0x3a0 kernel/jump_label.c:447
 static_key_disable_cpuslocked+0xca/0x1b0 kernel/jump_label.c:207
 static_key_disable+0x16/0x20 kernel/jump_label.c:215
 toggle_allocation_gate+0x3e0/0x480 mm/kfence/core.c:818
 process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2289
 worker_thread+0xa5f/0x1210 kernel/workqueue.c:2436
 kthread+0x268/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/04/21 18:29 linux-6.1.y f17b0ab65d17 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in nci_close_device
* Struck through repros no longer work on HEAD.