From: syzbot <syzbot+29566bbfe6b64b944865@syzkaller.appspotmail.com>
To: brauner@kernel.org, djwong@kernel.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-xfs@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: [syzbot] [iomap?] kernel BUG in folio_end_writeback (2)
Date: Thu, 13 Feb 2025 14:14:28 -0800 [thread overview]
Message-ID: <67ae6ec4.050a0220.21dd3.0027.GAE@google.com> (raw)
Hello,
syzbot found the following issue on:
HEAD commit: 69b54314c975 Merge tag 'kbuild-fixes-v6.14' of git://git.k..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1643abdf980000
kernel config: https://syzkaller.appspot.com/x/.config?x=1909f2f0d8e641ce
dashboard link: https://syzkaller.appspot.com/bug?extid=29566bbfe6b64b944865
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 (non-bootable): https://storage.googleapis.com/syzbot-assets/7feb34a89c2a/non_bootable_disk-69b54314.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/e32e396b49c9/vmlinux-69b54314.xz
kernel image: https://storage.googleapis.com/syzbot-assets/30d7fe7e4148/bzImage-69b54314.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+29566bbfe6b64b944865@syzkaller.appspotmail.com
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x54600
flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff)
raw: 04fff00000000000 ffffea000134ad48 ffffea0001518048 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: VM_BUG_ON_PAGE(page_ref_count(page) == 0)
page_owner tracks the page as freed
page last allocated via order 0, migratetype Movable, gfp_mask 0x153c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL|__GFP_MOVABLE|__GFP_WRITE), pid 5324, tgid 5323 (syz.0.0), ts 71600359556, free_ts 71965749654
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1551
prep_new_page mm/page_alloc.c:1559 [inline]
get_page_from_freelist+0x365c/0x37a0 mm/page_alloc.c:3477
__alloc_frozen_pages_noprof+0x292/0x710 mm/page_alloc.c:4739
alloc_pages_mpol+0x311/0x660 mm/mempolicy.c:2270
alloc_frozen_pages_noprof mm/mempolicy.c:2341 [inline]
alloc_pages_noprof+0x121/0x190 mm/mempolicy.c:2361
folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2371
filemap_alloc_folio_noprof+0xe1/0x540 mm/filemap.c:1019
__filemap_get_folio+0x438/0xae0 mm/filemap.c:1970
iomap_get_folio fs/iomap/buffered-io.c:608 [inline]
__iomap_get_folio fs/iomap/buffered-io.c:754 [inline]
iomap_write_begin+0x4d3/0x1990 fs/iomap/buffered-io.c:797
iomap_write_iter fs/iomap/buffered-io.c:955 [inline]
iomap_file_buffered_write+0x6ea/0x11c0 fs/iomap/buffered-io.c:1039
xfs_file_buffered_write+0x2cd/0xb20 fs/xfs/xfs_file.c:792
new_sync_write fs/read_write.c:586 [inline]
vfs_write+0xacf/0xd10 fs/read_write.c:679
ksys_write+0x18f/0x2b0 fs/read_write.c:731
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 5324 tgid 5323 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1127 [inline]
free_unref_folios+0xe40/0x18b0 mm/page_alloc.c:2707
folios_put_refs+0x76c/0x860 mm/swap.c:994
folio_batch_release include/linux/pagevec.h:101 [inline]
truncate_inode_pages_range+0xe65/0x10e0 mm/truncate.c:387
xfs_flush_unmap_range+0xb8/0xd0 fs/xfs/xfs_bmap_util.c:820
xfs_reflink_remap_prep+0x5fe/0x720
xfs_file_remap_range+0x287/0x910 fs/xfs/xfs_file.c:1210
vfs_copy_file_range+0xc07/0x14f0 fs/read_write.c:1584
__do_sys_copy_file_range fs/read_write.c:1670 [inline]
__se_sys_copy_file_range+0x3fa/0x600 fs/read_write.c:1637
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
------------[ cut here ]------------
kernel BUG at ./include/linux/mm.h:1153!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 1037 Comm: kworker/u4:7 Not tainted 6.14.0-rc1-syzkaller-00276-g69b54314c975 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Workqueue: loop0 loop_workfn
RIP: 0010:put_page_testzero include/linux/mm.h:1153 [inline]
RIP: 0010:folio_put_testzero include/linux/mm.h:1159 [inline]
RIP: 0010:folio_put include/linux/mm.h:1488 [inline]
RIP: 0010:folio_end_writeback+0x603/0x650 mm/filemap.c:1655
Code: 45 c7 ff 4c 89 ef 48 c7 c6 60 d7 13 8c e8 a5 5a 11 00 90 0f 0b e8 4d 45 c7 ff 4c 89 ef 48 c7 c6 a0 d6 13 8c e8 8e 5a 11 00 90 <0f> 0b e8 36 45 c7 ff 4c 89 ef 48 c7 c6 e0 d3 13 8c e8 77 5a 11 00
RSP: 0018:ffffc900025bf430 EFLAGS: 00010246
RAX: 4a021b16b8d5f700 RBX: 0000000000000000 RCX: 0000000000000001
RDX: dffffc0000000000 RSI: ffffffff8c0aa680 RDI: 0000000000000001
RBP: dffffc0000000000 R08: ffffffff942f994f R09: 1ffffffff285f329
R10: dffffc0000000000 R11: fffffbfff285f32a R12: 0000000000000000
R13: ffffea0001518000 R14: 1ffffd40002a3000 R15: ffffea0001518034
FS: 0000000000000000(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000400000000040 CR3: 00000000124d6000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
iomap_finish_folio_write fs/iomap/buffered-io.c:1533 [inline]
iomap_finish_ioend+0x462/0x6b0 fs/iomap/buffered-io.c:1561
blk_update_request+0x5e5/0x1160 block/blk-mq.c:983
blk_mq_end_request+0x3e/0x70 block/blk-mq.c:1145
loop_handle_cmd drivers/block/loop.c:1946 [inline]
loop_process_work+0x1bc8/0x21c0 drivers/block/loop.c:1964
process_one_work kernel/workqueue.c:3236 [inline]
process_scheduled_works+0xa66/0x1840 kernel/workqueue.c:3317
worker_thread+0x870/0xd30 kernel/workqueue.c:3398
kthread+0x7a9/0x920 kernel/kthread.c:464
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:put_page_testzero include/linux/mm.h:1153 [inline]
RIP: 0010:folio_put_testzero include/linux/mm.h:1159 [inline]
RIP: 0010:folio_put include/linux/mm.h:1488 [inline]
RIP: 0010:folio_end_writeback+0x603/0x650 mm/filemap.c:1655
Code: 45 c7 ff 4c 89 ef 48 c7 c6 60 d7 13 8c e8 a5 5a 11 00 90 0f 0b e8 4d 45 c7 ff 4c 89 ef 48 c7 c6 a0 d6 13 8c e8 8e 5a 11 00 90 <0f> 0b e8 36 45 c7 ff 4c 89 ef 48 c7 c6 e0 d3 13 8c e8 77 5a 11 00
RSP: 0018:ffffc900025bf430 EFLAGS: 00010246
RAX: 4a021b16b8d5f700 RBX: 0000000000000000 RCX: 0000000000000001
RDX: dffffc0000000000 RSI: ffffffff8c0aa680 RDI: 0000000000000001
RBP: dffffc0000000000 R08: ffffffff942f994f R09: 1ffffffff285f329
R10: dffffc0000000000 R11: fffffbfff285f32a R12: 0000000000000000
R13: ffffea0001518000 R14: 1ffffd40002a3000 R15: ffffea0001518034
FS: 0000000000000000(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000400000000040 CR3: 00000000124d6000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
---
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 syzkaller@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
reply other threads:[~2025-02-13 22:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=67ae6ec4.050a0220.21dd3.0027.GAE@google.com \
--to=syzbot+29566bbfe6b64b944865@syzkaller.appspotmail.com \
--cc=brauner@kernel.org \
--cc=djwong@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.