INFO: task hung in snd_seq_midisynth_remove

Status: upstream: reported on 2026/07/29 13:07
Reported-by: syzbot+0d260fb6413889183507@syzkaller.appspotmail.com
First crash: 19d, last: 15d
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 INFO: task hung in snd_seq_midisynth_remove 1 2 11d 15d 0/3 upstream: reported on 2026/08/03 07:27

Sample crash report:
INFO: task syz.0.237:5432 blocked for more than 144 seconds.
      Not tainted syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.0.237       state:D stack:26064 pid:5432  ppid:4283   flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5246 [inline]
 __schedule+0x107f/0x4030 kernel/sched/core.c:6563
 schedule+0xb9/0x180 kernel/sched/core.c:6639
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6698
 __mutex_lock_common kernel/locking/mutex.c:679 [inline]
 __mutex_lock+0x548/0xae0 kernel/locking/mutex.c:747
 snd_seq_midisynth_remove+0x68/0x4f0 sound/core/seq/seq_midi.c:459
 device_remove drivers/base/dd.c:549 [inline]
 __device_release_driver drivers/base/dd.c:1279 [inline]
 device_release_driver_internal+0x4cf/0x7c0 drivers/base/dd.c:1305
 bus_remove_device+0x2dd/0x400 drivers/base/bus.c:531
 device_del+0x63f/0xa80 drivers/base/core.c:3900
 snd_seq_device_dev_disconnect+0x39/0x40 sound/core/seq_device.c:182
 __snd_device_disconnect sound/core/device.c:63 [inline]
 snd_device_disconnect_all+0xcf/0x200 sound/core/device.c:215
 snd_card_disconnect+0x385/0x810 sound/core/init.c:538
 snd_card_free_when_closed+0x13/0x50 sound/core/init.c:630
 f_midi_unbind+0x99/0xf0 drivers/usb/gadget/function/f_midi.c:1335
 purge_configs_funcs+0x241/0x3a0 drivers/usb/gadget/configfs.c:1274
 configfs_composite_unbind+0xa0/0x1c0 drivers/usb/gadget/configfs.c:1453
 gadget_unbind_driver+0x1bb/0x3d0 drivers/usb/gadget/udc/core.c:1702
 device_remove drivers/base/dd.c:547 [inline]
 __device_release_driver drivers/base/dd.c:1279 [inline]
 device_release_driver_internal+0x47d/0x7c0 drivers/base/dd.c:1305
 driver_detach+0x1ef/0x2d0 drivers/base/dd.c:1368
 bus_remove_driver+0x11c/0x230 drivers/base/bus.c:679
 usb_gadget_unregister_driver+0x4a/0x70 drivers/usb/gadget/udc/core.c:1762
 unregister_gadget drivers/usb/gadget/configfs.c:253 [inline]
 gadget_dev_desc_UDC_store+0x174/0x2e0 drivers/usb/gadget/configfs.c:280
 flush_write_buffer fs/configfs/file.c:207 [inline]
 configfs_write_iter+0x30b/0x400 fs/configfs/file.c:229
 call_write_iter include/linux/fs.h:2265 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x482/0x9a0 fs/read_write.c:584
 ksys_write+0x14d/0x260 fs/read_write.c:637
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f9616d9e019
RSP: 002b:00007f9617d18028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f9617025fa0 RCX: 00007f9616d9e019
RDX: 0000000000000001 RSI: 0000200000000840 RDI: 0000000000000003
RBP: 00007f9616e3500c R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f9617026038 R14: 00007f9617025fa0 R15: 00007ffc6d1df978
 </TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
 #0: ffffffff8cb2e4f0 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x33/0xef0 kernel/rcu/tasks.h:517
1 lock held by rcu_tasks_trace/13:
 #0: ffffffff8cb2ed10 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x33/0xef0 kernel/rcu/tasks.h:517
8 locks held by kworker/0:1/14:
 #0: ffff88801d6f9138 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x7b4/0x1160 kernel/workqueue.c:2267
 #1: ffffc90000137d00 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x7b4/0x1160 kernel/workqueue.c:2267
 #2: ffff88823bcf2990 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:885 [inline]
 #2: ffff88823bcf2990 (&dev->mutex){....}-{3:3}, at: hub_event+0x178/0x5200 drivers/usb/core/hub.c:5845
 #3: ffff888059471190 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:885 [inline]
 #3: ffff888059471190 (&dev->mutex){....}-{3:3}, at: usb_disconnect+0xf8/0x8a0 drivers/usb/core/hub.c:2305
 #4: ffff888057b2d118 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:885 [inline]
 #4: ffff888057b2d118 (&dev->mutex){....}-{3:3}, at: __device_driver_lock drivers/base/dd.c:1099 [inline]
 #4: ffff888057b2d118 (&dev->mutex){....}-{3:3}, at: device_release_driver_internal+0xb1/0x7c0 drivers/base/dd.c:1302
 #5: ffffffff8dd00708 (register_mutex#7){+.+.}-{3:3}, at: usb_audio_disconnect+0xd0/0x6f0 sound/usb/card.c:960
 #6: ffff8880286b4170 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:885 [inline]
 #6: ffff8880286b4170 (&dev->mutex){....}-{3:3}, at: __device_driver_lock drivers/base/dd.c:1099 [inline]
 #6: ffff8880286b4170 (&dev->mutex){....}-{3:3}, at: device_release_driver_internal+0xb1/0x7c0 drivers/base/dd.c:1302
 #7: ffffffff8dcc62c8 (register_mutex#6){+.+.}-{3:3}, at: snd_seq_midisynth_remove+0x68/0x4f0 sound/core/seq/seq_midi.c:459
1 lock held by khungtaskd/28:
 #0: ffffffff8cb2db60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
 #0: ffffffff8cb2db60 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
 #0: ffffffff8cb2db60 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x51/0x290 kernel/locking/lockdep.c:6527
4 locks held by kworker/u4:4/59:
2 locks held by getty/4029:
 #0: ffff888030247098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
 #1: ffffc9000327b2f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x41e/0x1360 drivers/tty/n_tty.c:2198
8 locks held by syz.0.237/5432:
 #0: ffff888065ac39e8 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x2ae/0x360 fs/file.c:1038
 #1: ffff88801ab04460 (sb_writers#15){.+.+}-{0:0}, at: vfs_write+0x270/0x9a0 fs/read_write.c:580
 #2: ffff88801fb06088 (&buffer->mutex){+.+.}-{3:3}, at: configfs_write_iter+0x7d/0x400 fs/configfs/file.c:226
 #3: ffff888018ab6b78 (&p->frag_sem){.+.+}-{3:3}, at: flush_write_buffer fs/configfs/file.c:205 [inline]
 #3: ffff888018ab6b78 (&p->frag_sem){.+.+}-{3:3}, at: configfs_write_iter+0x20e/0x400 fs/configfs/file.c:229
 #4: ffff88807a6ca310 (&gi->lock){+.+.}-{3:3}, at: gadget_dev_desc_UDC_store+0xed/0x2e0 drivers/usb/gadget/configfs.c:277
 #5: ffff888026844dc0 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:885 [inline]
 #5: ffff888026844dc0 (&dev->mutex){....}-{3:3}, at: __device_driver_lock drivers/base/dd.c:1099 [inline]
 #5: ffff888026844dc0 (&dev->mutex){....}-{3:3}, at: device_release_driver_internal+0xb1/0x7c0 drivers/base/dd.c:1302
 #6: ffff88807b7b6170 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:885 [inline]
 #6: ffff88807b7b6170 (&dev->mutex){....}-{3:3}, at: __device_driver_lock drivers/base/dd.c:1099 [inline]
 #6: ffff88807b7b6170 (&dev->mutex){....}-{3:3}, at: device_release_driver_internal+0xb1/0x7c0 drivers/base/dd.c:1302
 #7: ffffffff8dcc62c8 (register_mutex#6){+.+.}-{3:3}, at: snd_seq_midisynth_remove+0x68/0x4f0 sound/core/seq/seq_midi.c:459
1 lock held by syz.5.576/7198:

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

NMI backtrace for cpu 0
CPU: 0 PID: 28 Comm: khungtaskd Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106
 nmi_cpu_backtrace+0x3e6/0x460 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x1d4/0x450 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+0xf0e/0xf50 kernel/hung_task.c:377
 kthread+0x29d/0x330 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 3621 Comm: syslogd Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
RIP: 0010:copy_user_enhanced_fast_string+0x3/0x40 arch/x86/lib/copy_user_64.S:164
Code: 07 48 ff c6 48 ff c7 ff c9 75 f2 89 d1 c1 e9 03 83 e2 07 f3 48 a5 89 d1 f3 a4 31 c0 0f 01 ca c3 8d 0c ca 89 ca eb 20 0f 01 cb <83> fa 40 72 38 89 d1 f3 a4 31 c0 0f 01 ca c3 89 ca eb 0a 90 90 90
RSP: 0018:ffffc90002f877f8 EFLAGS: 00040256
RAX: ffffffff84137501 RBX: 000000000000003d RCX: ffffffff8413754e
RDX: 000000000000003d RSI: ffff88807d6d4000 RDI: 000055e676ab0950
RBP: ffffc90002f87950 R08: ffff88807d6d403c R09: 1ffff1100fada807
R10: dffffc0000000000 R11: ffffed100fada808 R12: 1ffff920005f0f83
R13: 000055e676ab0950 R14: ffff88807d6d4000 R15: 00007fffffffefc3
FS:  00007fe930163c80(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00002000002ab030 CR3: 000000007e429000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline]
 raw_copy_to_user arch/x86/include/asm/uaccess_64.h:58 [inline]
 copyout lib/iov_iter.c:170 [inline]
 _copy_to_iter+0x2bb/0x1050 lib/iov_iter.c:528
 __skb_datagram_iter+0xde/0x740 net/core/datagram.c:419
 skb_copy_datagram_iter+0xd7/0x290 net/core/datagram.c:535
 skb_copy_datagram_msg include/linux/skbuff.h:4017 [inline]
 __unix_dgram_recvmsg+0x69b/0xd90 net/unix/af_unix.c:2490
 sock_recvmsg_nosec net/socket.c:1023 [inline]
 sock_recvmsg net/socket.c:1041 [inline]
 sock_read_iter+0x2da/0x3a0 net/socket.c:1122
 call_read_iter include/linux/fs.h:2259 [inline]
 new_sync_read fs/read_write.c:389 [inline]
 vfs_read+0x471/0x960 fs/read_write.c:470
 ksys_read+0x14d/0x260 fs/read_write.c:613
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7fe9302b3407
Code: 48 89 fa 4c 89 df e8 38 aa 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff
RSP: 002b:00007ffdf27edae0 EFLAGS: 00000202 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00007fe930163c80 RCX: 00007fe9302b3407
RDX: 00000000000000ff RSI: 000055e676ab0950 RDI: 0000000000000000
RBP: 000055e676ab0910 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 000055e676ab09db
R13: 0000000000000000 R14: 000055e676ab0950 R15: 000055e657de1d98
 </TASK>

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/08/03 00:14 linux-6.1.y fb28aa725e05 e611ffe1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in snd_seq_midisynth_remove
2026/08/01 08:24 linux-6.1.y fb28aa725e05 e611ffe1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in snd_seq_midisynth_remove
2026/07/29 13:06 linux-6.1.y dc5c83b7f5f8 19622d9d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in snd_seq_midisynth_remove
* Struck through repros no longer work on HEAD.