[v6.1] INFO: task hung in __bread_gfp

8 views
Skip to first unread message

syzbot

unread,
Jan 31, 2025, 10:10:19 AM1/31/25
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 75cefdf153f5 Linux 6.1.127
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=13164518580000
kernel config: https://syzkaller.appspot.com/x/.config?x=3dc848f1f9c50685
dashboard link: https://syzkaller.appspot.com/bug?extid=2aca91e1d3ae43aef10c
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/9fa70d9fd10a/disk-75cefdf1.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/d01cb9bb9789/vmlinux-75cefdf1.xz
kernel image: https://storage.googleapis.com/syzbot-assets/487423b91d50/bzImage-75cefdf1.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+2aca91...@syzkaller.appspotmail.com

INFO: task syz.7.3144:19085 blocked for more than 143 seconds.
Not tainted 6.1.127-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.7.3144 state:D stack:26208 pid:19085 ppid:14815 flags:0x00004004
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5241 [inline]
__schedule+0x143f/0x4570 kernel/sched/core.c:6558
schedule+0xbf/0x180 kernel/sched/core.c:6634
io_schedule+0x88/0x100 kernel/sched/core.c:8786
bit_wait_io+0xe/0xc0 kernel/sched/wait_bit.c:209
__wait_on_bit+0xa8/0x2e0 kernel/sched/wait_bit.c:49
out_of_line_wait_on_bit+0x1d0/0x250 kernel/sched/wait_bit.c:64
wait_on_bit_io include/linux/wait_bit.h:101 [inline]
__wait_on_buffer fs/buffer.c:122 [inline]
wait_on_buffer include/linux/buffer_head.h:385 [inline]
__bread_slow fs/buffer.c:1178 [inline]
__bread_gfp+0x2a8/0x370 fs/buffer.c:1370
sb_bread include/linux/buffer_head.h:338 [inline]
befs_fill_super+0x890/0xfb0 fs/befs/linuxvfs.c:854
mount_bdev+0x2c9/0x3f0 fs/super.c:1443
legacy_get_tree+0xeb/0x180 fs/fs_context.c:632
vfs_get_tree+0x88/0x270 fs/super.c:1573
do_new_mount+0x2ba/0xb40 fs/namespace.c:3056
do_mount fs/namespace.c:3399 [inline]
__do_sys_mount fs/namespace.c:3607 [inline]
__se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3584
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7fe9f3d8cda9
RSP: 002b:00007fe9f3bde038 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fe9f3fa6080 RCX: 00007fe9f3d8cda9
RDX: 0000000020000040 RSI: 00000000200004c0 RDI: 0000000020000480
RBP: 00007fe9f3e0e2a0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000008205 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fe9f3fa6080 R15: 00007ffe92c903c8
</TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
#0: ffffffff8d32b290 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xe30 kernel/rcu/tasks.h:517
1 lock held by rcu_tasks_trace/13:
#0: ffffffff8d32ba90 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xe30 kernel/rcu/tasks.h:517
1 lock held by khungtaskd/28:
#0: ffffffff8d32b0c0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
#0: ffffffff8d32b0c0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
#0: ffffffff8d32b0c0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x51/0x290 kernel/locking/lockdep.c:6510
2 locks held by getty/4005:
#0: ffff888030904098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
#1: ffffc9000325e2f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6a7/0x1db0 drivers/tty/n_tty.c:2198
3 locks held by kworker/0:7/4332:
#0: ffff888017c70938 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
#1: ffff8880b8e27788 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x419/0x790 kernel/sched/psi.c:999
#2: ffff88806587d240 (&data->fib_lock){+.+.}-{3:3}, at: nsim_fib_event_work+0x2cd/0x4120 drivers/net/netdevsim/fib.c:1491
2 locks held by kworker/1:3/14389:
#0: ffff888017c72138 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
#1: ffffc900033e7d20 ((work_completion)(&rew->rew_work)){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
1 lock held by syz.7.3144/19085:
#0: ffff88805ae340e0 (&type->s_umount_key#86/1){+.+.}-{3:3}, at: alloc_super+0x217/0x930 fs/super.c:228
1 lock held by syz.6.3236/19559:
#0: ffff88805ae340e0 (&type->s_umount_key#87){.+.+}-{3:3}, at: iterate_supers+0xac/0x1e0 fs/super.c:755
2 locks held by syz-executor/19883:
#0: ffff88805a8c00e0 (&type->s_umount_key#60){++++}-{3:3}, at: deactivate_super+0xa9/0xe0 fs/super.c:362
#1: ffffffff8d3306b8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:291 [inline]
#1: ffffffff8d3306b8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x4f0/0x930 kernel/rcu/tree_exp.h:962
1 lock held by dhcpcd-run-hook/21274:

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

NMI backtrace for cpu 0
CPU: 0 PID: 28 Comm: khungtaskd Not tainted 6.1.127-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
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+0x1ae/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+0xf88/0xfd0 kernel/hung_task.c:377
kthread+0x28d/0x320 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: 4330 Comm: kworker/u4:7 Not tainted 6.1.127-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
Workqueue: events_unbound toggle_allocation_gate
RIP: 0010:text_poke_bp_batch+0x67d/0x940
Code: 01 00 00 00 48 c7 c7 40 d7 31 81 48 8d 94 24 d0 00 00 00 e8 75 e6 ff ff 41 ff c7 48 ba 00 00 00 00 00 fc ff df 48 8b 74 24 08 <41> b8 0f 00 00 00 4c 8b 4c 24 10 49 83 c6 10 49 83 c4 10 4c 39 64
RSP: 0018:ffffc900044a79c0 EFLAGS: 00000206
RAX: ffffffff81e14eac RBX: 00000000000000e9 RCX: 0000000000000001
RDX: dffffc0000000000 RSI: ffffffff9005bca0 RDI: 0000000000000001
RBP: ffffc900044a7ae8 R08: dffffc0000000000 R09: ffffed1002f8cc0d
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000020
R13: 0000000000e14eac R14: ffffffff9005bcc0 R15: 0000000000000003
FS: 0000000000000000(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055b460ddba18 CR3: 000000000d08e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<NMI>
</NMI>
<TASK>
text_poke_flush arch/x86/kernel/alternative.c:1725 [inline]
text_poke_finish+0x16/0x30 arch/x86/kernel/alternative.c:1732
arch_jump_label_transform_apply+0x13/0x20 arch/x86/kernel/jump_label.c:146
static_key_enable_cpuslocked+0x12e/0x250 kernel/jump_label.c:207
static_key_enable+0x16/0x20 kernel/jump_label.c:220
toggle_allocation_gate+0xbf/0x480 mm/kfence/core.c:804
process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292
worker_thread+0xa47/0x1200 kernel/workqueue.c:2439
kthread+0x28d/0x320 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
</TASK>


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Feb 1, 2025, 6:33:22 AM2/1/25
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 75cefdf153f5 Linux 6.1.127
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=13b48eb0580000
kernel config: https://syzkaller.appspot.com/x/.config?x=3dc848f1f9c50685
dashboard link: https://syzkaller.appspot.com/bug?extid=2aca91e1d3ae43aef10c
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14593ddf980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16f055f8580000
INFO: task syz-executor964:4246 blocked for more than 143 seconds.
Not tainted 6.1.127-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor964 state:D stack:26184 pid:4246 ppid:4245 flags:0x00004006
RIP: 0033:0x7fee0a2e18f9
RSP: 002b:00007ffe64cd28e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 00007fee0a2e18f9
RDX: 0000000020000040 RSI: 00000000200004c0 RDI: 0000000020000480
RBP: 00007fee0a3545f0 R08: 0000000000000000 R09: 0000000000000006
R10: 0000000000008205 R11: 0000000000000246 R12: 0000000000000001
R13: 431bde82d7b634db R14: 0000000000000001 R15: 0000000000000001
</TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
#0: ffffffff8d32b290 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xe30 kernel/rcu/tasks.h:517
1 lock held by rcu_tasks_trace/13:
#0: ffffffff8d32ba90 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xe30 kernel/rcu/tasks.h:517
1 lock held by khungtaskd/28:
#0: ffffffff8d32b0c0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
#0: ffffffff8d32b0c0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
#0: ffffffff8d32b0c0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x51/0x290 kernel/locking/lockdep.c:6510
2 locks held by getty/4019:
#0: ffff88807e028098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
#1: ffffc9000325e2f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6a7/0x1db0 drivers/tty/n_tty.c:2198
1 lock held by syz-executor964/4246:
#0: ffff88802fd760e0 (&type->s_umount_key#41/1){+.+.}-{3:3}, at: alloc_super+0x217/0x930 fs/super.c:228

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

NMI backtrace for cpu 0
CPU: 0 PID: 28 Comm: khungtaskd Not tainted 6.1.127-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
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+0x1ae/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+0xf88/0xfd0 kernel/hung_task.c:377
kthread+0x28d/0x320 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: 2896 Comm: kworker/u4:5 Not tainted 6.1.127-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
Workqueue: events_unbound toggle_allocation_gate
RIP: 0010:insn_get_sib arch/x86/lib/insn.c:431 [inline]
RIP: 0010:insn_get_displacement+0x22e/0x970 arch/x86/lib/insn.c:464
Code: 31 f7 4c 3b 23 0f 87 f9 04 00 00 e8 5c 13 da f6 48 8b 54 24 10 48 89 d0 48 c1 e8 03 48 bb 00 00 00 00 00 fc ff df 0f b6 04 18 <84> c0 0f 85 dc 06 00 00 0f b6 12 80 7c 1d 00 00 48 89 dd 74 0c 4c
RSP: 0018:ffffc9000c8b7820 EFLAGS: 00000a03
RAX: 0000000000000000 RBX: dffffc0000000000 RCX: ffff88802fbcbb80
RDX: ffffffff8b068b6d RSI: 0000000000000004 RDI: 0000000000000004
RBP: 1ffff92001916f3d R08: ffffffff8ab088cd R09: ffffc9000c8b7980
R10: 0000000000000000 R11: dffffc0000000001 R12: ffffffff8b068b6e
R13: ffffc9000c8b7980 R14: ffffc9000c8b79e8 R15: 1ffff92001916f36
FS: 0000000000000000(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000564404d73680 CR3: 000000000d08e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<NMI>
</NMI>
<TASK>
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:1638
arch_jump_label_transform_queue+0x71/0xd0 arch/x86/kernel/jump_label.c:138
__jump_label_update+0x177/0x3a0 kernel/jump_label.c:510
static_key_disable_cpuslocked+0xce/0x1b0 kernel/jump_label.c:237
static_key_disable+0x16/0x20 kernel/jump_label.c:245
toggle_allocation_gate+0x3e0/0x480 mm/kfence/core.c:818
process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292
worker_thread+0xa47/0x1200 kernel/workqueue.c:2439
kthread+0x28d/0x320 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
</TASK>
INFO: NMI handler (nmi_cpu_backtrace_handler) took too long to run: 1.185 msecs


---
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.

syzbot

unread,
Mar 24, 2025, 12:51:05 PM3/24/25
to syzkaller...@googlegroups.com
syzbot suspects this issue could be fixed by backporting the following commit:

commit 3eb96946f0be6bf447cbdf219aba22bc42672f92
git tree: upstream
Author: Christoph Hellwig <h...@lst.de>
Date: Wed May 24 06:05:38 2023 +0000

block: make bio_check_eod work for zero sized devices

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=11b2e24c580000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1475cd18580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=161b7ddf980000


Please keep in mind that other backports might be required as well.

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages