syzbot


INFO: task hung in new_device_store (3)

Status: upstream: reported on 2024/08/16 14:40
Reported-by: syzbot+2f90f9cf86ce31cecea0@syzkaller.appspotmail.com
First crash: 31d, last: 13d
Similar bugs (7)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in new_device_store (3) net 12 389d 576d 0/28 auto-obsoleted due to no activity on 2023/11/22 09:08
linux-6.1 INFO: task hung in new_device_store 1 68d 68d 0/3 upstream: reported on 2024/07/10 01:20
upstream INFO: task hung in new_device_store (4) net 25 189d 244d 0/28 auto-obsoleted due to no activity on 2024/04/30 15:01
linux-5.15 INFO: task hung in new_device_store syz error 1 539d 539d 0/3 auto-obsoleted due to no activity on 2023/07/24 22:37
upstream INFO: task hung in new_device_store (2) net 1 713d 713d 0/28 auto-obsoleted due to no activity on 2023/01/15 11:32
upstream INFO: task hung in new_device_store net 1 881d 881d 0/28 auto-closed as invalid on 2022/07/18 12:08
linux-5.15 INFO: task hung in new_device_store (2) 1 238d 238d 0/3 auto-obsoleted due to no activity on 2024/05/01 03:38

Sample crash report:
INFO: task syz-executor:5279 blocked for more than 143 seconds.
      Not tainted 5.15.165-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor    state:D stack:21432 pid: 5279 ppid:     1 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5027 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6373
 schedule+0x11b/0x1f0 kernel/sched/core.c:6456
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6515
 __mutex_lock_common+0xe34/0x25a0 kernel/locking/mutex.c:669
 __mutex_lock kernel/locking/mutex.c:729 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
 new_device_store+0x1b0/0x910 drivers/net/netdevsim/bus.c:295
 kernfs_fop_write_iter+0x3a2/0x4f0 fs/kernfs/file.c:296
 call_write_iter include/linux/fs.h:2172 [inline]
 new_sync_write fs/read_write.c:507 [inline]
 vfs_write+0xacd/0xe50 fs/read_write.c:594
 ksys_write+0x1a2/0x2c0 fs/read_write.c:647
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7ff380aca99f
RSP: 002b:00007ffd2337dca0 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 00007ff380aca99f
RDX: 0000000000000003 RSI: 00007ffd2337dcf0 RDI: 0000000000000005
RBP: 00007ff380b3f081 R08: 0000000000000000 R09: 00007ffd2337daf7
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000003
R13: 00007ffd2337dcf0 R14: 00007ff3817b3620 R15: 0000000000000003
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffffffff8c91fbe0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
3 locks held by kworker/u4:1/144:
 #0: ffff888017079138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc9000125fd20 ((linkwatch_work).work){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffffffff8da30dc8 (rtnl_mutex){+.+.}-{3:3}, at: linkwatch_event+0xa/0x50 net/core/link_watch.c:251
1 lock held by dhcpcd/3239:
 #0: ffffffff8da30dc8 (rtnl_mutex){+.+.}-{3:3}, at: __netlink_dump_start+0x12e/0x6f0 net/netlink/af_netlink.c:2347
2 locks held by getty/3335:
 #0: ffff888028a55098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:252
 #1: ffffc9000229b2e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6af/0x1db0 drivers/tty/n_tty.c:2158
1 lock held by syz-executor/3582:
 #0: ffffffff8da30dc8 (rtnl_mutex){+.+.}-{3:3}, at: netdev_run_todo+0xa4f/0xc40 net/core/dev.c:10656
4 locks held by kworker/u4:6/3684:
 #0: ffff8880171d5938 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc90003137d20 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffffffff8da25210 (pernet_ops_rwsem){++++}-{3:3}, at: cleanup_net+0xf1/0xb60 net/core/net_namespace.c:561
 #3: ffffffff8da30dc8 (rtnl_mutex){+.+.}-{3:3}, at: wg_netns_pre_exit+0x1b/0x1d0 drivers/net/wireguard/device.c:404
4 locks held by kworker/1:10/4091:
3 locks held by kworker/1:16/4102:
 #0: ffff888017070938 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc90003407d20 ((work_completion)(&(&nsim_dev->trap_data->trap_report_dw)->work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffff888022ffe400 (&nsim_dev->port_list_lock){+.+.}-{3:3}, at: nsim_dev_trap_report_work+0x56/0xab0 drivers/net/netdevsim/dev.c:757
3 locks held by kworker/1:19/4105:
4 locks held by syz-executor/5279:
 #0: ffff888029ee8460 (sb_writers#8){.+.+}-{0:0}, at: vfs_write+0x29a/0xe50 fs/read_write.c:590
 #1: ffff888064bf5088 (&of->mutex){+.+.}-{3:3}, at: kernfs_fop_write_iter+0x1e7/0x4f0 fs/kernfs/file.c:287
 #2: ffff888023c68e88 (kn->active#233){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x20b/0x4f0 fs/kernfs/file.c:288
 #3: ffffffff8d372b28 (nsim_bus_dev_list_lock){+.+.}-{3:3}, at: new_device_store+0x1b0/0x910 drivers/net/netdevsim/bus.c:295
7 locks held by syz-executor/5298:
 #0: ffff888029ee8460 (sb_writers#8){.+.+}-{0:0}, at: vfs_write+0x29a/0xe50 fs/read_write.c:590
 #1: ffff888069a6ac88 (&of->mutex){+.+.}-{3:3}, at: kernfs_fop_write_iter+0x1e7/0x4f0 fs/kernfs/file.c:287
 #2: ffff888023c65008 (kn->active#232){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x20b/0x4f0 fs/kernfs/file.c:288
 #3: ffffffff8d372b28 (nsim_bus_dev_list_lock){+.+.}-{3:3}, at: del_device_store+0xf1/0x470 drivers/net/netdevsim/bus.c:344
 #4: ffff888022abc178 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
 #4: ffff888022abc178 (&dev->mutex){....}-{3:3}, at: __device_driver_lock drivers/base/dd.c:1044 [inline]
 #4: ffff888022abc178 (&dev->mutex){....}-{3:3}, at: device_release_driver_internal+0xc2/0x7f0 drivers/base/dd.c:1259
 #5: ffff888022ffe400 (&nsim_dev->port_list_lock){+.+.}-{3:3}, at: nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1359 [inline]
 #5: ffff888022ffe400 (&nsim_dev->port_list_lock){+.+.}-{3:3}, at: nsim_dev_reload_destroy+0x118/0x240 drivers/net/netdevsim/dev.c:1561
 #6: ffffffff8da30dc8 (rtnl_mutex){+.+.}-{3:3}, at: netdev_run_todo+0xa4f/0xc40 net/core/dev.c:10656
1 lock held by syz.0.488/5357:
 #0: ffffffff8da30dc8 (rtnl_mutex){+.+.}-{3:3}, at: netdev_run_todo+0xa4f/0xc40 net/core/dev.c:10656
1 lock held by syz-executor/5393:
 #0: ffffffff8da30dc8 (rtnl_mutex){+.+.}-{3:3}, at: netdev_run_todo+0xa4f/0xc40 net/core/dev.c:10656
1 lock held by syz-executor/5399:
 #0: ffffffff8da30dc8 (rtnl_mutex){+.+.}-{3:3}, at: tun_detach drivers/net/tun.c:699 [inline]
 #0: ffffffff8da30dc8 (rtnl_mutex){+.+.}-{3:3}, at: tun_chr_close+0x3a/0x1b0 drivers/net/tun.c:3440
1 lock held by syz-executor/5400:
 #0: ffffffff8da30dc8 (rtnl_mutex){+.+.}-{3:3}, at: tun_detach drivers/net/tun.c:699 [inline]
 #0: ffffffff8da30dc8 (rtnl_mutex){+.+.}-{3:3}, at: tun_chr_close+0x3a/0x1b0 drivers/net/tun.c:3440
2 locks held by syz-executor/5407:
 #0: ffff8880780c8ff0 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close+0x63/0x1070 net/bluetooth/hci_core.c:1737
 #1: ffff8880780c8078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_do_close+0x431/0x1070 net/bluetooth/hci_core.c:1782
3 locks held by syz-executor/5410:
 #0: ffff888025324ff0 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close+0x63/0x1070 net/bluetooth/hci_core.c:1737
 #1: ffff888025324078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_do_close+0x431/0x1070 net/bluetooth/hci_core.c:1782
 #2: ffffffff8db7a428 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_disconn_cfm include/net/bluetooth/hci_core.h:1522 [inline]
 #2: ffffffff8db7a428 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xb8/0x220 net/bluetooth/hci_conn.c:1622
1 lock held by syz-executor/5417:
 #0: ffffffff8da30dc8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:72 [inline]
 #0: ffffffff8da30dc8 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x94c/0xee0 net/core/rtnetlink.c:5615
2 locks held by syz-executor/5433:
 #0: ffffffff8da25210 (pernet_ops_rwsem){++++}-{3:3}, at: copy_net_ns+0x378/0x5d0 net/core/net_namespace.c:472
 #1: ffffffff8da30dc8 (rtnl_mutex){+.+.}-{3:3}, at: ip_tunnel_init_net+0x20f/0x700 net/ipv4/ip_tunnel.c:1096
2 locks held by syz-executor/5434:
 #0: ffffffff8da25210 (pernet_ops_rwsem){++++}-{3:3}, at: copy_net_ns+0x378/0x5d0 net/core/net_namespace.c:472
 #1: ffffffff8da30dc8 (rtnl_mutex){+.+.}-{3:3}, at: ip_tunnel_init_net+0x20f/0x700 net/ipv4/ip_tunnel.c:1096
2 locks held by syz-executor/5439:
 #0: ffffffff8da25210 (pernet_ops_rwsem){++++}-{3:3}, at: copy_net_ns+0x378/0x5d0 net/core/net_namespace.c:472
 #1: ffffffff8da30dc8 (rtnl_mutex){+.+.}-{3:3}, at: register_nexthop_notifier+0x80/0x270 net/ipv4/nexthop.c:3607
2 locks held by syz-executor/5442:
 #0: ffffffff8da25210 (pernet_ops_rwsem){++++}-{3:3}, at: copy_net_ns+0x378/0x5d0 net/core/net_namespace.c:472
 #1: ffffffff8da30dc8 (rtnl_mutex){+.+.}-{3:3}, at: register_nexthop_notifier+0x80/0x270 net/ipv4/nexthop.c:3607
1 lock held by syz-executor/5445:
 #0: ffffffff8da30dc8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:72 [inline]
 #0: ffffffff8da30dc8 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x94c/0xee0 net/core/rtnetlink.c:5615

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

NMI backtrace for cpu 0
CPU: 0 PID: 27 Comm: khungtaskd Not tainted 5.15.165-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x46a/0x4a0 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x181/0x2a0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:210 [inline]
 watchdog+0xe72/0xeb0 kernel/hung_task.c:295
 kthread+0x3f6/0x4f0 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 4091 Comm: kworker/1:10 Not tainted 5.15.165-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
Workqueue: events_power_efficient gc_worker
RIP: 0010:kasan_mem_to_shadow include/linux/kasan.h:55 [inline]
RIP: 0010:memory_is_poisoned_n mm/kasan/generic.c:128 [inline]
RIP: 0010:memory_is_poisoned mm/kasan/generic.c:159 [inline]
RIP: 0010:check_region_inline mm/kasan/generic.c:180 [inline]
RIP: 0010:kasan_check_range+0x33/0x290 mm/kasan/generic.c:189
Code: 85 f6 0f 84 9a 01 00 00 48 89 fd 48 01 f5 0f 82 59 02 00 00 48 89 fd 48 c1 ed 2f 81 fd ff ff 01 00 0f 82 46 02 00 00 48 89 fb <48> c1 eb 03 49 b8 00 00 00 00 00 fc ff df 4e 8d 0c 03 4c 8d 54 37
RSP: 0018:ffffc90000dd0bb8 EFLAGS: 00000046
RAX: 0000000000000001 RBX: ffffc90000dd0c40 RCX: ffffffff816422da
RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffc90000dd0c40
RBP: 000000000001ffff R08: dffffc0000000000 R09: ffffed1017225441
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff8880b912a200
R13: 1ffff920001ba188 R14: ffffc90000dd0c40 R15: 1ffff11017225441
FS:  0000000000000000(0000) GS:ffff8880b9100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b3221cff8 CR3: 000000000c68e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <IRQ>
 instrument_atomic_read_write include/linux/instrumented.h:101 [inline]
 atomic_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:512 [inline]
 queued_spin_lock include/asm-generic/qspinlock.h:82 [inline]
 do_raw_spin_lock+0x14a/0x370 kernel/locking/spinlock_debug.c:115
 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:129 [inline]
 _raw_spin_lock_irq+0xdb/0x110 kernel/locking/spinlock.c:170
 __run_hrtimer kernel/time/hrtimer.c:1690 [inline]
 __hrtimer_run_queues+0x662/0xcf0 kernel/time/hrtimer.c:1750
 hrtimer_interrupt+0x392/0x980 kernel/time/hrtimer.c:1812
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1085 [inline]
 __sysvec_apic_timer_interrupt+0x139/0x470 arch/x86/kernel/apic/apic.c:1102
 sysvec_apic_timer_interrupt+0x8c/0xb0 arch/x86/kernel/apic/apic.c:1096
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:seqcount_lockdep_reader_access+0x1dc/0x220 include/linux/seqlock.h:106
Code: f8 4d 85 ed 75 16 e8 93 90 f0 f8 eb 15 e8 8c 90 f0 f8 e8 57 7c a3 01 4d 85 ed 74 ea e8 7d 90 f0 f8 fb 48 c7 04 24 0e 36 e0 45 <4b> c7 04 3c 00 00 00 00 66 43 c7 44 3c 09 00 00 43 c6 44 3c 0b 00
RSP: 0018:ffffc9000327fa40 EFLAGS: 00000293
RAX: ffffffff888fd123 RBX: 0000000000000000 RCX: ffff888023480000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc9000327faf0 R08: ffffffff888fd0f9 R09: fffffbfff20e1e2b
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: 0000000000000200 R14: 0000000000000046 R15: 1ffff9200064ff48
 nf_conntrack_get_ht include/net/netfilter/nf_conntrack.h:338 [inline]
 gc_worker+0x30f/0x14b0 net/netfilter/nf_conntrack_core.c:1472
 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310
 worker_thread+0xaca/0x1280 kernel/workqueue.c:2457
 kthread+0x3f6/0x4f0 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/03 12:41 linux-5.15.y fa93fa65db6e 326f9c5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in new_device_store
2024/08/16 14:39 linux-5.15.y 7e89efd3ae1c e1c76ab2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in new_device_store
* Struck through repros no longer work on HEAD.