folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x346/0xda0 mm/truncate.c:383 kill_bdev block/bdev.c:91 [inline] set_blocksize+0x32a/0x500 block/bdev.c:207 blkdev_bszset+0x1ac/0x220 block/ioctl.c:554 blkdev_ioctl+0x430/0x6d0 block/ioctl.c:688 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:598 [inline] __se_sys_ioctl+0xf9/0x170 fs/ioctl.c:584 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f ------------[ cut here ]------------ kernel BUG at mm/filemap.c:868! Oops: invalid opcode: 0000 [#1] SMP KASAN PTI CPU: 1 UID: 0 PID: 7787 Comm: syz.0.351 Not tainted 6.17.0-rc1-next-20250814-syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 RIP: 0010:__filemap_add_folio+0x11ad/0x12f0 mm/filemap.c:867 Code: 47 c9 ff 4c 89 e7 48 c7 c6 e0 3c 94 8b e8 9b 9d 31 ff 90 0f 0b e8 f3 46 c9 ff 4c 89 e7 48 c7 c6 c0 33 94 8b e8 84 9d 31 ff 90 <0f> 0b e8 dc 46 c9 ff 4c 89 e7 48 c7 c6 e0 3c 94 8b e8 6d 9d 31 ff RSP: 0018:ffffc9001cecf220 EFLAGS: 00010246 RAX: 96988d8816962a00 RBX: 0000000000000000 RCX: 96988d8816962a00 RDX: ffffc9000bf1a000 RSI: ffffffff8be34be0 RDI: ffff88807b300000 RBP: ffffc9001cecf390 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffffbfff1bfa1ec R12: ffffea0000bb5300 R13: dffffc0000000000 R14: ffffea0000bb5308 R15: 0000000000000002 FS: 00007fdd505836c0(0000) GS:ffff888125d0f000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000200000020000 CR3: 000000007d43a000 CR4: 00000000003526f0 Call Trace: filemap_add_folio+0xd5/0x270 mm/filemap.c:969 ra_alloc_folio mm/readahead.c:448 [inline] page_cache_ra_order+0x643/0xd40 mm/readahead.c:506 do_sync_mmap_readahead+0x25e/0x7a0 mm/filemap.c:-1 filemap_fault+0x62c/0x1200 mm/filemap.c:3446 __do_fault+0x135/0x390 mm/memory.c:5280 do_shared_fault mm/memory.c:5765 [inline] do_fault mm/memory.c:5839 [inline] do_pte_missing mm/memory.c:4362 [inline] handle_pte_fault mm/memory.c:6180 [inline] __handle_mm_fault+0x1847/0x5440 mm/memory.c:6323 handle_mm_fault+0x40a/0x8e0 mm/memory.c:6492 do_user_addr_fault+0x764/0x1390 arch/x86/mm/fault.c:1387 handle_page_fault arch/x86/mm/fault.c:1476 [inline] exc_page_fault+0x76/0xf0 arch/x86/mm/fault.c:1532 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 RIP: 0010:rep_movs_alternative+0x33/0x90 arch/x86/lib/copy_user_64.S:61 Code: 73 25 85 c9 74 0f 8a 06 88 07 48 ff c7 48 ff c6 48 ff c9 75 f1 c3 cc cc cc cc 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 RSP: 0018:ffffc9001cecfb88 EFLAGS: 00050246 RAX: 0000000000000000 RBX: 0000000000000008 RCX: 0000000000000008 RDX: 0000000000000000 RSI: ffffc9001cecfc20 RDI: 0000200000020000 RBP: ffffc9001cecfc90 R08: ffffc9001cecfc27 R09: 1ffff920039d9f84 R10: dffffc0000000000 R11: fffff520039d9f85 R12: 0000200000020008 R13: 00007ffffffff000 R14: ffffc9001cecfc20 R15: 0000200000020000 copy_user_generic arch/x86/include/asm/uaccess_64.h:126 [inline] raw_copy_to_user arch/x86/include/asm/uaccess_64.h:147 [inline] _inline_copy_to_user include/linux/uaccess.h:197 [inline] _copy_to_user+0x8a/0xb0 lib/usercopy.c:26 copy_to_user include/linux/uaccess.h:225 [inline] msr_read+0x177/0x250 arch/x86/kernel/msr.c:69 vfs_read+0x1fd/0xa30 fs/read_write.c:570 ksys_read+0x145/0x250 fs/read_write.c:715 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fdd4f78ebe9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fdd50583038 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 00007fdd4f9b5fa0 RCX: 00007fdd4f78ebe9 RDX: 0000000000018ff8 RSI: 0000200000019680 RDI: 0000000000000004 RBP: 00007fdd4f811e19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fdd4f9b6038 R14: 00007fdd4f9b5fa0 R15: 00007ffe9580fba8 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:__filemap_add_folio+0x11ad/0x12f0 mm/filemap.c:867 Code: 47 c9 ff 4c 89 e7 48 c7 c6 e0 3c 94 8b e8 9b 9d 31 ff 90 0f 0b e8 f3 46 c9 ff 4c 89 e7 48 c7 c6 c0 33 94 8b e8 84 9d 31 ff 90 <0f> 0b e8 dc 46 c9 ff 4c 89 e7 48 c7 c6 e0 3c 94 8b e8 6d 9d 31 ff RSP: 0018:ffffc9001cecf220 EFLAGS: 00010246 RAX: 96988d8816962a00 RBX: 0000000000000000 RCX: 96988d8816962a00 RDX: ffffc9000bf1a000 RSI: ffffffff8be34be0 RDI: ffff88807b300000 RBP: ffffc9001cecf390 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffffbfff1bfa1ec R12: ffffea0000bb5300 R13: dffffc0000000000 R14: ffffea0000bb5308 R15: 0000000000000002 FS: 00007fdd505836c0(0000) GS:ffff888125d0f000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000200000020000 CR3: 000000007d43a000 CR4: 00000000003526f0 ---------------- Code disassembly (best guess): 0: 73 25 jae 0x27 2: 85 c9 test %ecx,%ecx 4: 74 0f je 0x15 6: 8a 06 mov (%rsi),%al 8: 88 07 mov %al,(%rdi) a: 48 ff c7 inc %rdi d: 48 ff c6 inc %rsi 10: 48 ff c9 dec %rcx 13: 75 f1 jne 0x6 15: c3 ret 16: cc int3 17: cc int3 18: cc int3 19: cc int3 1a: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 21: 00 00 00 24: 0f 1f 00 nopl (%rax) 27: 48 8b 06 mov (%rsi),%rax * 2a: 48 89 07 mov %rax,(%rdi) <-- trapping instruction 2d: 48 83 c6 08 add $0x8,%rsi 31: 48 83 c7 08 add $0x8,%rdi 35: 83 e9 08 sub $0x8,%ecx 38: 74 db je 0x15 3a: 83 f9 08 cmp $0x8,%ecx 3d: 73 e8 jae 0x27 3f: eb .byte 0xeb