kworker/u17:0: attempt to access beyond end of device loop1: rw=1, sector=77824, nr_sectors = 504 limit=40427 ------------[ cut here ]------------ kernel BUG at mm/filemap.c:1619! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 8 Comm: kworker/u17:0 Not tainted 6.3.0-rc6-syzkaller-00138-g44149752e998 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 Workqueue: writeback wb_workfn (flush-7:1) RIP: 0010:folio_end_writeback+0x391/0x3b0 mm/filemap.c:1619 Code: ef e8 43 9c 25 00 e9 82 fe ff ff 4c 89 e7 e8 56 9c 25 00 e9 c8 fc ff ff 48 89 ef e8 49 9c 25 00 e9 d5 fd ff ff e8 ef 76 d5 ff <0f> 0b e8 38 9c 25 00 e9 11 fe ff ff 48 89 df e8 2b 9c 25 00 e9 80 RSP: 0018:ffffc900005beec8 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 00000000015e9b00 RCX: 0000000000000000 RDX: ffff8880140b4200 RSI: ffffffff81ac9521 RDI: 0000000000000001 RBP: ffffea00015e9bc0 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000003 R12: ffffea00015e9bf4 R13: 0000000000000000 R14: 0000000000000011 R15: ffff88800c388000 FS: 0000000000000000(0000) GS:ffff88802c600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b30344000 CR3: 00000000237d7000 CR4: 0000000000150ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: f2fs_write_end_io+0x7c0/0x1170 fs/f2fs/data.c:377 bio_endio+0x5bb/0x6c0 block/bio.c:1607 submit_bio_noacct+0x306/0x1a30 block/blk-core.c:814 submit_bio block/blk-core.c:843 [inline] submit_bio+0x8f/0x1c0 block/blk-core.c:831 f2fs_submit_merged_ipu_write+0x3cb/0x5c0 fs/f2fs/data.c:919 f2fs_write_single_data_page+0x14f4/0x1810 fs/f2fs/data.c:2901 f2fs_write_cache_pages+0xce9/0x1ef0 fs/f2fs/data.c:3144 __f2fs_write_data_pages fs/f2fs/data.c:3295 [inline] f2fs_write_data_pages+0xc4e/0x10a0 fs/f2fs/data.c:3322 do_writepages+0x1a8/0x640 mm/page-writeback.c:2551 __writeback_single_inode+0x121/0xdc0 fs/fs-writeback.c:1600 writeback_sb_inodes+0x54d/0xe70 fs/fs-writeback.c:1891 __writeback_inodes_wb+0xc6/0x280 fs/fs-writeback.c:1962 wb_writeback+0x7e9/0xa50 fs/fs-writeback.c:2067 wb_check_background_flush fs/fs-writeback.c:2133 [inline] wb_do_writeback fs/fs-writeback.c:2221 [inline] wb_workfn+0x8b0/0xfc0 fs/fs-writeback.c:2248 process_one_work+0x991/0x15c0 kernel/workqueue.c:2390 worker_thread+0x669/0x1090 kernel/workqueue.c:2537 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:folio_end_writeback+0x391/0x3b0 mm/filemap.c:1619 Code: ef e8 43 9c 25 00 e9 82 fe ff ff 4c 89 e7 e8 56 9c 25 00 e9 c8 fc ff ff 48 89 ef e8 49 9c 25 00 e9 d5 fd ff ff e8 ef 76 d5 ff <0f> 0b e8 38 9c 25 00 e9 11 fe ff ff 48 89 df e8 2b 9c 25 00 e9 80 RSP: 0018:ffffc900005beec8 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 00000000015e9b00 RCX: 0000000000000000 RDX: ffff8880140b4200 RSI: ffffffff81ac9521 RDI: 0000000000000001 RBP: ffffea00015e9bc0 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000003 R12: ffffea00015e9bf4 R13: 0000000000000000 R14: 0000000000000011 R15: ffff88800c388000 FS: 0000000000000000(0000) GS:ffff88802c600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000563973933ee1 CR3: 0000000024bea000 CR4: 0000000000150ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400