Subject: Re: [syzbot] [net?] INFO: task hung in new_device_store (5)

From: syzbot <[email-masked]>
Date: Thu, 25 Dec 2025 08:24:19 -0800

syzbot has found a reproducer for the following issue on:

HEAD commit:    8f0b4cce4481 Linux 6.19-rc1
git tree:       git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
console output: https://syzkaller.appspot.com/x/log.txt?x=156eb09a580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=8a8594efdc14f07a
dashboard link: https://syzkaller.appspot.com/bug?extid=05f9cecd28e356241aba
compiler:       Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
userspace arch: arm64
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=177f9758580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=14b2ab92580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/cd4f5f43efc8/disk-8f0b4cce.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/aafb35ac3a3c/vmlinux-8f0b4cce.xz
kernel image: https://storage.googleapis.com/syzbot-assets/d221fae4ab17/Image-8f0b4cce.gz.xz

Bisection is inconclusive: the first bad commit could be any of:

949090eaf0a3 sched/eevdf: Remove min_vruntime_copy
8e2e13ac6122 sched/fair: Cleanup pick_task_fair() vs throttle

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=10491fd0580000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: [email-masked]

INFO: task syz-executor:6714 blocked for more than 144 seconds.
      Not tainted syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor    state:D stack:0     pid:6714  tgid:6714  ppid:1      task_flags:0x400140 flags:0x00000001
Call trace:
 __switch_to+0x418/0x87c arch/arm64/kernel/process.c:741 (T)
 context_switch kernel/sched/core.c:5256 [inline]
 __schedule+0x1250/0x2a7c kernel/sched/core.c:6863
 __schedule_loop kernel/sched/core.c:6945 [inline]
 schedule+0xb4/0x230 kernel/sched/core.c:6960
 schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:7017
 __mutex_lock_common+0xd04/0x2678 kernel/locking/mutex.c:692
 __mutex_lock kernel/locking/mutex.c:776 [inline]
 mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:828
 new_device_store+0x128/0x594 drivers/net/netdevsim/bus.c:184
 bus_attr_store+0x80/0xa4 drivers/base/bus.c:172
 sysfs_kf_write+0x1a8/0x23c fs/sysfs/file.c:142
 kernfs_fop_write_iter+0x33c/0x4d0 fs/kernfs/file.c:352
 new_sync_write fs/read_write.c:593 [inline]
 vfs_write+0x540/0xa3c fs/read_write.c:686
 ksys_write+0x120/0x210 fs/read_write.c:738
 __do_sys_write fs/read_write.c:749 [inline]
 __se_sys_write fs/read_write.c:746 [inline]
 __arm64_sys_write+0x7c/0x90 fs/read_write.c:746
 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline]
 invoke_syscall+0x98/0x254 arch/arm64/kernel/syscall.c:49
 el0_svc_common+0xe8/0x23c arch/arm64/kernel/syscall.c:132
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151
 el0_svc+0x5c/0x26c arch/arm64/kernel/entry-common.c:724
 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:743
 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596
INFO: task syz-executor:6720 blocked for more than 144 seconds.
      Not tainted syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor    state:D stack:0     pid:6720  tgid:6720  ppid:1      task_flags:0x400140 flags:0x00000011
Call trace:
 __switch_to+0x418/0x87c arch/arm64/kernel/process.c:741 (T)
 context_switch kernel/sched/core.c:5256 [inline]
 __schedule+0x1250/0x2a7c kernel/sched/core.c:6863
 __schedule_loop kernel/sched/core.c:6945 [inline]
 schedule+0xb4/0x230 kernel/sched/core.c:6960
 schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:7017
 __mutex_lock_common+0xd04/0x2678 kernel/locking/mutex.c:692
 __mutex_lock kernel/locking/mutex.c:776 [inline]
 mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:828
 device_lock include/linux/device.h:895 [inline]
 device_del+0xa4/0x808 drivers/base/core.c:3840
 device_unregister+0x2c/0xf4 drivers/base/core.c:3919
 nsim_bus_dev_del drivers/net/netdevsim/bus.c:483 [inline]
 del_device_store+0x27c/0x31c drivers/net/netdevsim/bus.c:244
 bus_attr_store+0x80/0xa4 drivers/base/bus.c:172
 sysfs_kf_write+0x1a8/0x23c fs/sysfs/file.c:142
 kernfs_fop_write_iter+0x33c/0x4d0 fs/kernfs/file.c:352
 new_sync_write fs/read_write.c:593 [inline]
 vfs_write+0x540/0xa3c fs/read_write.c:686
 ksys_write+0x120/0x210 fs/read_write.c:738
 __do_sys_write fs/read_write.c:749 [inline]
 __se_sys_write fs/read_write.c:746 [inline]
 __arm64_sys_write+0x7c/0x90 fs/read_write.c:746
 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline]
 invoke_syscall+0x98/0x254 arch/arm64/kernel/syscall.c:49
 el0_svc_common+0xe8/0x23c arch/arm64/kernel/syscall.c:132
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151
 el0_svc+0x5c/0x26c arch/arm64/kernel/entry-common.c:724
 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:743
 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596
INFO: task syz-executor:6724 blocked for more than 146 seconds.
      Not tainted syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor    state:D stack:0     pid:6724  tgid:6724  ppid:6719   task_flags:0x400140 flags:0x00800000
Call trace:
 __switch_to+0x418/0x87c arch/arm64/kernel/process.c:741 (T)
 context_switch kernel/sched/core.c:5256 [inline]
 __schedule+0x1250/0x2a7c kernel/sched/core.c:6863
 __schedule_loop kernel/sched/core.c:6945 [inline]
 schedule+0xb4/0x230 kernel/sched/core.c:6960
 schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:7017
 __mutex_lock_common+0xd04/0x2678 kernel/locking/mutex.c:692
 __mutex_lock kernel/locking/mutex.c:776 [inline]
 mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:828
 del_device_store+0xd4/0x31c drivers/net/netdevsim/bus.c:234
 bus_attr_store+0x80/0xa4 drivers/base/bus.c:172
 sysfs_kf_write+0x1a8/0x23c fs/sysfs/file.c:142
 kernfs_fop_write_iter+0x33c/0x4d0 fs/kernfs/file.c:352
 new_sync_write fs/read_write.c:593 [inline]
 vfs_write+0x540/0xa3c fs/read_write.c:686
 ksys_write+0x120/0x210 fs/read_write.c:738
 __do_sys_write fs/read_write.c:749 [inline]
 __se_sys_write fs/read_write.c:746 [inline]
 __arm64_sys_write+0x7c/0x90 fs/read_write.c:746
 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline]
 invoke_syscall+0x98/0x254 arch/arm64/kernel/syscall.c:49
 el0_svc_common+0xe8/0x23c arch/arm64/kernel/syscall.c:132
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151
 el0_svc+0x5c/0x26c arch/arm64/kernel/entry-common.c:724
 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:743
 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596

Showing all locks held in the system:
3 locks held by kworker/u8:1/13:
2 locks held by kworker/1:1/26:
1 lock held by khungtaskd/32:
 #0: ffff80008fa5b520 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire+0x4/0x48 include/linux/rcupdate.h:330
3 locks held by kworker/u8:2/41:
1 lock held by pr/ttyAMA-1/43:
6 locks held by kworker/u8:5/155:
3 locks held by kworker/u8:7/713:
 #0: ffff0000d55b1948 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: process_one_work+0x63c/0x1558 kernel/workqueue.c:3231
 #1: ffff80009d0f7be0 ((work_completion)(&(&ifa->dad_work)->work)){+.+.}-{0:0}, at: process_one_work+0x6d0/0x1558 kernel/workqueue.c:3231
 #2: ffff800092ae4168 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_lock+0x20/0x2c net/core/rtnetlink.c:80
2 locks held by kworker/u8:8/1023:
6 locks held by kworker/u8:9/1342:
 #0: ffff0000c1843148 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work+0x63c/0x1558 kernel/workqueue.c:3231
 #1: ffff80009ed07be0 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work+0x6d0/0x1558 kernel/workqueue.c:3231
 #2: ffff800092ad71f0 (pernet_ops_rwsem){++++}-{4:4}, at: cleanup_net+0xf0/0x638 net/core/net_namespace.c:670
 #3: ffff0000da33f0e8 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:895 [inline]
 #3: ffff0000da33f0e8 (&dev->mutex){....}-{4:4}, at: devl_dev_lock net/devlink/devl_internal.h:108 [inline]
 #3: ffff0000da33f0e8 (&dev->mutex){....}-{4:4}, at: devlink_pernet_pre_exit+0xe4/0x380 net/devlink/core.c:506
 #4: ffff0000c7b48250 (&devlink->lock_key){+.+.}-{4:4}, at: devl_lock net/devlink/core.c:276 [inline]
 #4: ffff0000c7b48250 (&devlink->lock_key){+.+.}-{4:4}, at: devl_dev_lock net/devlink/devl_internal.h:109 [inline]
 #4: ffff0000c7b48250 (&devlink->lock_key){+.+.}-{4:4}, at: devlink_pernet_pre_exit+0xf0/0x380 net/devlink/core.c:506
 #5: ffff800092ae4168 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_lock+0x20/0x2c net/core/rtnetlink.c:80
3 locks held by kworker/u8:10/1512:
2 locks held by kworker/0:2/3988:
3 locks held by kworker/u8:14/4835:
3 locks held by kworker/u8:15/5060:
 #0: ffff0000c0031948 ((wq_completion)events_unbound#2){+.+.}-{0:0}, at: process_one_work+0x63c/0x1558 kernel/workqueue.c:3231
 #1: ffff8000a4817be0 ((linkwatch_work).work){+.+.}-{0:0}, at: process_one_work+0x6d0/0x1558 kernel/workqueue.c:3231
 #2: ffff800092ae4168 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_lock+0x20/0x2c net/core/rtnetlink.c:80
3 locks held by kworker/u8:16/5722:
3 locks held by udevd/6209:
3 locks held by dhcpcd/6265:
2 locks held by getty/6351:
 #0: ffff0000d5dd30a0 (&tty->ldisc_sem){++++}-{0:0}, at: ldsem_down_read+0x3c/0x4c drivers/tty/tty_ldsem.c:340
 #1: ffff800099f1e2f0 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0x34c/0xfc8 drivers/tty/n_tty.c:2211
2 locks held by kworker/1:3/6704:
4 locks held by syz-executor/6714:
 #0: ffff0000dc442420 (sb_writers#6){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2681 [inline]
 #0: ffff0000dc442420 (sb_writers#6){.+.+}-{0:0}, at: vfs_write+0x24c/0xa3c fs/read_write.c:682
 #1: ffff0000d4d40888 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x1b4/0x4d0 fs/kernfs/file.c:343
 #2: ffff0000ce348878 (kn->active#56){.+.+}-{0:0}, at: kernfs_get_active_of fs/kernfs/file.c:80 [inline]
 #2: ffff0000ce348878 (kn->active#56){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x1f4/0x4d0 fs/kernfs/file.c:344
 #3: ffff800091bf3648 (nsim_bus_dev_list_lock){+.+.}-{4:4}, at: new_device_store+0x128/0x594 drivers/net/netdevsim/bus.c:184
5 locks held by syz-executor/6720:
 #0: ffff0000dc442420 (sb_writers#6){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2681 [inline]
 #0: ffff0000dc442420 (sb_writers#6){.+.+}-{0:0}, at: vfs_write+0x24c/0xa3c fs/read_write.c:682
 #1: ffff0000d6511488 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x1b4/0x4d0 fs/kernfs/file.c:343
 #2: ffff0000ce348968 (kn->active#55){.+.+}-{0:0}, at: kernfs_get_active_of fs/kernfs/file.c:80 [inline]
 #2: ffff0000ce348968 (kn->active#55){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x1f4/0x4d0 fs/kernfs/file.c:344
 #3: ffff800091bf3648 (nsim_bus_dev_list_lock){+.+.}-{4:4}, at: del_device_store+0xd4/0x31c drivers/net/netdevsim/bus.c:234
 #4: ffff0000da33f0e8 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:895 [inline]
 #4: ffff0000da33f0e8 (&dev->mutex){....}-{4:4}, at: device_del+0xa4/0x808 drivers/base/core.c:3840
4 locks held by syz-executor/6724:
 #0: ffff0000dc442420 (sb_writers#6){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2681 [inline]
 #0: ffff0000dc442420 (sb_writers#6){.+.+}-{0:0}, at: vfs_write+0x24c/0xa3c fs/read_write.c:682
 #1: ffff0000d6512888 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x1b4/0x4d0 fs/kernfs/file.c:343
 #2: ffff0000ce348968 (kn->active#55){.+.+}-{0:0}, at: kernfs_get_active_of fs/kernfs/file.c:80 [inline]
 #2: ffff0000ce348968 (kn->active#55){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x1f4/0x4d0 fs/kernfs/file.c:344
 #3: ffff800091bf3648 (nsim_bus_dev_list_lock){+.+.}-{4:4}, at: del_device_store+0xd4/0x31c drivers/net/netdevsim/bus.c:234
4 locks held by kworker/0:4/6772:
 #0: ffff0000c0029948 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x63c/0x1558 kernel/workqueue.c:3231
 #1: ffff8000a3f67be0 ((work_completion)(&helper->damage_work)){+.+.}-{0:0}, at: process_one_work+0x6d0/0x1558 kernel/workqueue.c:3231
 #2: ffff0000ca9f5280 (&helper->lock){+.+.}-{4:4}, at: drm_fb_helper_fb_dirty drivers/gpu/drm/drm_fb_helper.c:333 [inline]
 #2: ffff0000ca9f5280 (&helper->lock){+.+.}-{4:4}, at: drm_fb_helper_damage_work+0xa8/0x568 drivers/gpu/drm/drm_fb_helper.c:369
 #3: ffff0000caeb8128 (&dev->master_mutex){+.+.}-{4:4}, at: drm_master_internal_acquire+0x24/0x78 drivers/gpu/drm/drm_auth.c:435
2 locks held by syz.0.17/6788:
4 locks held by kworker/0:8/6796:
 #0: ffff0000d54fcd48 ((wq_completion)mld){+.+.}-{0:0}, at: process_one_work+0x63c/0x1558 kernel/workqueue.c:3231
 #1: ffff8000a3ef7be0 ((work_completion)(&(&idev->mc_ifc_work)->work)){+.+.}-{0:0}, at: process_one_work+0x6d0/0x1558 kernel/workqueue.c:3231
 #2: ffff0000dcc68538 (&idev->mc_lock){+.+.}-{4:4}, at: mld_ifc_work+0x38/0xc38 net/ipv6/mcast.c:2692
 #3: ffff80008f916b20 (sched_map-wait-type-override){+.+.}-{3:3}, at: sched_submit_work+0x14/0x144 kernel/sched/core.c:6893
5 locks held by syz-executor/6797:
2 locks held by syz-executor/6802:
2 locks held by syz-executor/6804:

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

---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.