[v6.1] INFO: task hung in __fdget_pos (3)

3 views
Skip to first unread message

syzbot

unread,
Dec 30, 2024, 10:02:23 AM12/30/24
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 563edd786f0a Linux 6.1.122
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=13096af8580000
kernel config: https://syzkaller.appspot.com/x/.config?x=b70d05b26edc7515
dashboard link: https://syzkaller.appspot.com/bug?extid=7afe2c8af40c90bd139f
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=102ce818580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=176ea6df980000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/9f111015ce9f/disk-563edd78.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/821c260b7642/vmlinux-563edd78.xz
kernel image: https://storage.googleapis.com/syzbot-assets/9fba8f114c58/bzImage-563edd78.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/f862c577dd00/mount_2.gz

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

INFO: task syz-executor155:4265 blocked for more than 143 seconds.
Tainted: G W 6.1.122-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor155 state:D stack:28672 pid:4265 ppid:4261 flags:0x00004006
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
schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6693
__mutex_lock_common kernel/locking/mutex.c:679 [inline]
__mutex_lock+0x6b9/0xd80 kernel/locking/mutex.c:747
__fdget_pos+0x2ba/0x360 fs/file.c:1031
fdget_pos include/linux/file.h:74 [inline]
__do_sys_getdents64 fs/readdir.c:365 [inline]
__se_sys_getdents64+0x1d8/0x4f0 fs/readdir.c:354
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:0x7f8a869817d9
RSP: 002b:00007f8a8691d218 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9
RAX: ffffffffffffffda RBX: 00007f8a86a09718 RCX: 00007f8a869817d9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000005
RBP: 00007f8a86a09710 R08: 00007ffc764750b7 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f8a869d65e0
R13: 00007f8a869d507e R14: 00007f8a869d50e0 R15: 0030656c69662f2e
</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+0x34/0xde0 kernel/rcu/tasks.h:543
1 lock held by rcu_tasks_trace/13:
#0: ffffffff8d32bab0 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x34/0xde0 kernel/rcu/tasks.h:543
1 lock held by khungtaskd/27:
#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/4006:
#0: ffff888030f29098 (&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 syz-executor155/4263:
1 lock held by syz-executor155/4265:
#0: ffff88807cce5768 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x2ba/0x360 fs/file.c:1031

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

NMI backtrace for cpu 0
CPU: 0 PID: 27 Comm: khungtaskd Tainted: G W 6.1.122-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/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: 4263 Comm: syz-executor155 Tainted: G W 6.1.122-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:__find_get_block+0x103/0x1120 fs/buffer.c:1303
Code: e8 52 d2 e0 ff 4c 8b bc 24 a0 00 00 00 bb 00 02 00 00 be 00 02 00 00 4c 21 fe 31 ff e8 d6 42 89 ff 4c 21 fb 0f 84 b9 0f 00 00 <4c> 8d bc 24 c0 00 00 00 4c 89 fb 48 c1 eb 03 48 b8 00 00 00 00 00
RSP: 0018:ffffc90003c074c0 EFLAGS: 00000206
RAX: 0000000000000000 RBX: 0000000000000200 RCX: ffff888030f9bb80
RDX: 0000000000000000 RSI: 0000000000000200 RDI: 0000000000000000
RBP: ffffc90003c07600 R08: ffffffff82015d7a R09: ffffffff825bfb03
R10: 0000000000000003 R11: ffff888030f9bb80 R12: dffffc0000000000
R13: 1ffff92000780ea0 R14: 0000000000000200 R15: 0000000000000246
FS: 00007f8a8693e6c0(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8a8693f000 CR3: 0000000074487000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<NMI>
</NMI>
<TASK>
__getblk_gfp+0x2d/0xa20 fs/buffer.c:1329
__bread_gfp+0x2a/0x370 fs/buffer.c:1367
sb_bread include/linux/buffer_head.h:338 [inline]
exfat_get_dentry+0x64d/0x8f0 fs/exfat/dir.c:735
exfat_readdir fs/exfat/dir.c:121 [inline]
exfat_iterate+0xb4c/0x3270 fs/exfat/dir.c:257
iterate_dir+0x224/0x560
__do_sys_getdents64 fs/readdir.c:369 [inline]
__se_sys_getdents64+0x209/0x4f0 fs/readdir.c:354
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:0x7f8a869817d9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 81 18 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f8a8693e218 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9
RAX: ffffffffffffffda RBX: 00007f8a86a09708 RCX: 00007f8a869817d9
RDX: 0000000000000646 RSI: 0000000020000240 RDI: 0000000000000005
RBP: 00007f8a86a09700 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f8a869d65e0
R13: 00007f8a869d507e R14: 00007f8a869d50e0 R15: 0030656c69662f2e
</TASK>
INFO: NMI handler (nmi_cpu_backtrace_handler) took too long to run: 1.078 msecs


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

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 5, 2025, 9:11:04 AM2/5/25
to syzkaller...@googlegroups.com
syzbot suspects this issue was fixed by commit:

commit 31beabd0f47f8c3ed9965ba861c9e5b252d4920a
Author: Yuezhang Mo <Yuezh...@sony.com>
Date: Fri Dec 13 05:08:37 2024 +0000

exfat: fix the infinite loop in exfat_readdir()

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=15093eb0580000
start commit: 563edd786f0a Linux 6.1.122
git tree: linux-6.1.y
If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: exfat: fix the infinite loop in exfat_readdir()

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