Kernel bug: INFO: task hung in ni_readpage_cmpr (3)
Subsystem: ntfs3
Status: fixed

Crash report:
INFO: task syz.0.17:5990 blocked for more than 143 seconds.
      Not tainted syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.0.17        state:D stack:24728 pid:5990  tgid:5990  ppid:5942   task_flags:0x440140 flags:0x00080002
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5258 [inline]
 __schedule+0x150e/0x5070 kernel/sched/core.c:6866
 __schedule_loop kernel/sched/core.c:6948 [inline]
 schedule+0x165/0x360 kernel/sched/core.c:6963
 io_schedule+0x80/0xd0 kernel/sched/core.c:7792
 folio_wait_bit_common+0x6b0/0xb80 mm/filemap.c:1323
 __folio_lock mm/filemap.c:1699 [inline]
 folio_lock include/linux/pagemap.h:1159 [inline]
 __filemap_get_folio_mpol+0x13e/0xb00 mm/filemap.c:1954
 __filemap_get_folio include/linux/pagemap.h:763 [inline]
 ntfs_lock_new_page+0x30/0x7c0 fs/ntfs3/frecord.c:2028
 ni_readpage_cmpr+0x685/0x940 fs/ntfs3/frecord.c:2102
 ntfs_read_folio+0x18d/0x200 fs/ntfs3/inode.c:739
 read_pages+0x35d/0x580 mm/readahead.c:173
 page_cache_ra_unbounded+0x750/0x990 mm/readahead.c:302
 do_sync_mmap_readahead+0x394/0x870 mm/filemap.c:3360
 filemap_fault+0x6ac/0x1290 mm/filemap.c:3549
 __do_fault+0x138/0x390 mm/memory.c:5320
 do_read_fault mm/memory.c:5755 [inline]
 do_fault mm/memory.c:5889 [inline]
 do_pte_missing+0x2206/0x3330 mm/memory.c:4401
 handle_pte_fault mm/memory.c:6273 [inline]
 __handle_mm_fault mm/memory.c:6411 [inline]
 handle_mm_fault+0x1b26/0x32b0 mm/memory.c:6580
 do_user_addr_fault+0x764/0x1380 arch/x86/mm/fault.c:1387
 handle_page_fault arch/x86/mm/fault.c:1476 [inline]
 exc_page_fault+0x82/0x100 arch/x86/mm/fault.c:1532
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:618
RIP: 0010:rep_movs_alternative+0x4a/0x90 arch/x86/lib/copy_user_64.S:74
Code: 48 04 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 8b 06 48 89 07 48 83 c6 08 48 83 c7 08 83 e9 08 74 db 83 f9 08 73 e8 eb c5 <f3> a4 c3 cc cc cc cc 48 8b 06 48 89 07 48 8d 47 08 48 83 e0 f8 48
RSP: 0018:ffffc900039d7cf8 EFLAGS: 00050202
RAX: 00007ffffffff001 RBX: 0000000000000094 RCX: 0000000000000094
RDX: 0000000000000001 RSI: 00002000000036c0 RDI: ffffc900039d7d60
RBP: ffffc900039d7ea8 R08: ffffc900039d7df3 R09: 1ffff9200073afbe
R10: dffffc0000000000 R11: fffff5200073afbf R12: 1ffff9200073afa8
R13: 0000000000000094 R14: ffffc900039d7d60 R15: 00002000000036c0
 copy_user_generic arch/x86/include/asm/uaccess_64.h:126 [inline]
 raw_copy_from_user arch/x86/include/asm/uaccess_64.h:141 [inline]
 _inline_copy_from_user include/linux/uaccess.h:185 [inline]
 _copy_from_user+0x7a/0xb0 lib/usercopy.c:18
 copy_from_user include/linux/uaccess.h:223 [inline]
 copy_from_bpfptr_offset include/linux/bpfptr.h:53 [inline]
 copy_from_bpfptr include/linux/bpfptr.h:59 [inline]
 __sys_bpf+0x1e3/0x860 kernel/bpf/syscall.c:6137
 __do_sys_bpf kernel/bpf/syscall.c:6274 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:6272 [inline]
 __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:6272
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f1a6ed8f749
RSP: 002b:00007ffc59a79778 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007f1a6efe5fa0 RCX: 00007f1a6ed8f749
RDX: 0000000000000094 RSI: 00002000000036c0 RDI: 0000000000000005
RBP: 00007f1a6ee13f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f1a6efe5fa0 R14: 00007f1a6efe5fa0 R15: 0000000000000003
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/31:
 #0: ffffffff8df41b20 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline]
 #0: ffffffff8df41b20 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:867 [inline]
 #0: ffffffff8df41b20 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x2e/0x180 kernel/locking/lockdep.c:6775
2 locks held by getty/5587:
 #0: ffff8880302930a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243
 #1: ffffc9000332b2f0 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0x449/0x1460 drivers/tty/n_tty.c:2211
2 locks held by syz.0.17/5990:
 #0: ffff888059627270 (mapping.invalidate_lock#3){.+.+}-{4:4}, at: filemap_invalidate_lock_shared include/linux/fs.h:1092 [inline]
 #0: ffff888059627270 (mapping.invalidate_lock#3){.+.+}-{4:4}, at: page_cache_ra_unbounded+0x1cf/0x990 mm/readahead.c:233
 #1: ffff888059626e38 (&ni->ni_lock#3/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1127 [inline]
 #1: ffff888059626e38 (&ni->ni_lock#3/5){+.+.}-{4:4}, at: ntfs_read_folio+0x180/0x200 fs/ntfs3/inode.c:738
2 locks held by syz.1.18/6017:
 #0: ffff88805972f270 (mapping.invalidate_lock#3){.+.+}-{4:4}, at: filemap_invalidate_lock_shared include/linux/fs.h:1092 [inline]
 #0: ffff88805972f270 (mapping.invalidate_lock#3){.+.+}-{4:4}, at: page_cache_ra_unbounded+0x1cf/0x990 mm/readahead.c:233
 #1: ffff88805972ee38 (&ni->ni_lock#3/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1127 [inline]
 #1: ffff88805972ee38 (&ni->ni_lock#3/5){+.+.}-{4:4}, at: ntfs_read_folio+0x180/0x200 fs/ntfs3/inode.c:738
2 locks held by syz.2.19/6043:
 #0: ffff888074a56b28 (mapping.invalidate_lock#3){.+.+}-{4:4}, at: filemap_invalidate_lock_shared include/linux/fs.h:1092 [inline]
 #0: ffff888074a56b28 (mapping.invalidate_lock#3){.+.+}-{4:4}, at: page_cache_ra_unbounded+0x1cf/0x990 mm/readahead.c:233
 #1: ffff888074a566f0 (&ni->ni_lock#3/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1127 [inline]
 #1: ffff888074a566f0 (&ni->ni_lock#3/5){+.+.}-{4:4}, at: ntfs_read_folio+0x180/0x200 fs/ntfs3/inode.c:738
2 locks held by syz.3.20/6065:
 #0: ffff8880595fa258 (mapping.invalidate_lock#3){.+.+}-{4:4}, at: filemap_invalidate_lock_shared include/linux/fs.h:1092 [inline]
 #0: ffff8880595fa258 (mapping.invalidate_lock#3){.+.+}-{4:4}, at: page_cache_ra_unbounded+0x1cf/0x990 mm/readahead.c:233
 #1: ffff8880595f9e20 (&ni->ni_lock#3/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1127 [inline]
 #1: ffff8880595f9e20 (&ni->ni_lock#3/5){+.+.}-{4:4}, at: ntfs_read_folio+0x180/0x200 fs/ntfs3/inode.c:738
2 locks held by syz.4.21/6093:
 #0: ffff888074a52258 (mapping.invalidate_lock#3){.+.+}-{4:4}, at: filemap_invalidate_lock_shared include/linux/fs.h:1092 [inline]
 #0: ffff888074a52258 (mapping.invalidate_lock#3){.+.+}-{4:4}, at: page_cache_ra_unbounded+0x1cf/0x990 mm/readahead.c:233
 #1: ffff888074a51e20 (&ni->ni_lock#3/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1127 [inline]
 #1: ffff888074a51e20 (&ni->ni_lock#3/5){+.+.}-{4:4}, at: ntfs_read_folio+0x180/0x200 fs/ntfs3/inode.c:738
2 locks held by syz.5.22/6126:
 #0: ffff888074b55550 (mapping.invalidate_lock#3){.+.+}-{4:4}, at: filemap_invalidate_lock_shared include/linux/fs.h:1092 [inline]
 #0: ffff888074b55550 (mapping.invalidate_lock#3){.+.+}-{4:4}, at: page_cache_ra_unbounded+0x1cf/0x990 mm/readahead.c:233
 #1: ffff888074b55118 (&ni->ni_lock#3/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1127 [inline]
 #1: ffff888074b55118 (&ni->ni_lock#3/5){+.+.}-{4:4}, at: ntfs_read_folio+0x180/0x200 fs/ntfs3/inode.c:738
2 locks held by syz.6.23/6154:
 #0: ffff888074970c80 (mapping.invalidate_lock#3){.+.+}-{4:4}, at: filemap_invalidate_lock_shared include/linux/fs.h:1092 [inline]
 #0: ffff888074970c80 (mapping.invalidate_lock#3){.+.+}-{4:4}, at: page_cache_ra_unbounded+0x1cf/0x990 mm/readahead.c:233
 #1: ffff888074970848 (&ni->ni_lock#3/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1127 [inline]
 #1: ffff888074970848 (&ni->ni_lock#3/5){+.+.}-{4:4}, at: ntfs_read_folio+0x180/0x200 fs/ntfs3/inode.c:738
2 locks held by syz.7.24/6183:
 #0: ffff888074974e08 (mapping.invalidate_lock#3){.+.+}-{4:4}, at: filemap_invalidate_lock_shared include/linux/fs.h:1092 [inline]
 #0: ffff888074974e08 (mapping.invalidate_lock#3){.+.+}-{4:4}, at: page_cache_ra_unbounded+0x1cf/0x990 mm/readahead.c:233
 #1: ffff8880749749d0 (&ni->ni_lock#3/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1127 [inline]
 #1: ffff8880749749d0 (&ni->ni_lock#3/5){+.+.}-{4:4}, at: ntfs_read_folio+0x180/0x200 fs/ntfs3/inode.c:738
2 locks held by syz.8.25/6213:
 #0: ffff888074b53f78 (mapping.invalidate_lock#3){.+.+}-{4:4}, at: filemap_invalidate_lock_shared include/linux/fs.h:1092 [inline]
 #0: ffff888074b53f78 (mapping.invalidate_lock#3){.+.+}-{4:4}, at: page_cache_ra_unbounded+0x1cf/0x990 mm/readahead.c:233
 #1: ffff888074b53b40 (&ni->ni_lock#3/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1127 [inline]
 #1: ffff888074b53b40 (&ni->ni_lock#3/5){+.+.}-{4:4}, at: ntfs_read_folio+0x180/0x200 fs/ntfs3/inode.c:738
3 locks held by syz-executor/6227:
 #0: ffffffff8ea95a68 (&ops->srcu#2){.+.+}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline]
 #0: ffffffff8ea95a68 (&ops->srcu#2){.+.+}-{0:0}, at: rcu_read_lock include/linux/rcupdate.h:867 [inline]
 #0: ffffffff8ea95a68 (&ops->srcu#2){.+.+}-{0:0}, at: rtnl_link_ops_get+0x23/0x250 net/core/rtnetlink.c:570
 #1: ffffffff8f312808 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_lock net/core/rtnetlink.c:80 [inline]
 #1: ffffffff8f312808 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_nets_lock net/core/rtnetlink.c:341 [inline]
 #1: ffffffff8f312808 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_newlink+0x8ec/0x1c90 net/core/rtnetlink.c:4071
 #2: ffffffff8df47678 (rcu_state.exp_mutex){+.+.}-{4:4}, at: exp_funnel_lock kernel/rcu/tree_exp.h:311 [inline]
 #2: ffffffff8df47678 (rcu_state.exp_mutex){+.+.}-{4:4}, at: synchronize_rcu_expedited+0x2f6/0x730 kernel/rcu/tree_exp.h:956

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

NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 31 Comm: khungtaskd Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
 nmi_cpu_backtrace+0x39e/0x3d0 lib/nmi_backtrace.c:113
 nmi_trigger_cpumask_backtrace+0x17a/0x300 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:160 [inline]
 __sys_info lib/sys_info.c:157 [inline]
 sys_info+0x135/0x170 lib/sys_info.c:165
 check_hung_uninterruptible_tasks kernel/hung_task.c:346 [inline]
 watchdog+0xf95/0xfe0 kernel/hung_task.c:515
 kthread+0x711/0x8a0 kernel/kthread.c:463
 ret_from_fork+0x599/0xb30 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
RIP: 0010:pv_native_safe_halt+0x13/0x20 arch/x86/kernel/paravirt.c:82
Code: cc cc cc cc cc cc cc 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 66 90 0f 00 2d b3 70 0c 00 f3 0f 1e fa fb f4 <e9> 48 ee 02 00 cc cc cc cc cc cc cc cc 90 90 90 90 90 90 90 90 90
RSP: 0018:ffffffff8dc07d80 EFLAGS: 000002c6
RAX: 6db6cff425dcf100 RBX: ffffffff8197928a RCX: 6db6cff425dcf100
RDX: 0000000000000001 RSI: ffffffff8d793d57 RDI: ffffffff8bc08460
RBP: ffffffff8dc07ea8 R08: ffff8880b86336db R09: 1ffff110170c66db
R10: dffffc0000000000 R11: ffffed10170c66dc R12: ffffffff8f822c70
R13: 1ffffffff1b92a68 R14: 0000000000000000 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff888125e32000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f3c16117d60 CR3: 000000000dd3a000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 arch_safe_halt arch/x86/include/asm/paravirt.h:107 [inline]
 default_idle+0x13/0x20 arch/x86/kernel/process.c:767
 default_idle_call+0x73/0xb0 kernel/sched/idle.c:122
 cpuidle_idle_call kernel/sched/idle.c:191 [inline]
 do_idle+0x1ea/0x520 kernel/sched/idle.c:332
 cpu_startup_entry+0x44/0x60 kernel/sched/idle.c:430
 rest_init+0x2de/0x300 init/main.c:757
 start_kernel+0x3a7/0x400 init/main.c:1206
 x86_64_start_reservations+0x24/0x30 arch/x86/kernel/head64.c:310
 x86_64_start_kernel+0x143/0x1c0 arch/x86/kernel/head64.c:291
 common_startup_64+0x13e/0x147
 </TASK>