All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+daa4cd155cd8696efe4f@syzkaller.appspotmail.com>
To: almaz.alexandrovich@paragon-software.com, brauner@kernel.org,
	 linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-xfs@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [iomap?] WARNING in iomap_release_folio
Date: Wed, 25 Nov 2026 01:52:29 -0800	[thread overview]
Message-ID: <6b06afdd.9416b02e.106116.000e.GAE@google.com> (raw)
In-Reply-To: <6b048c5c.a481e175.27cf24.0021.GAE@google.com>

syzbot has found a reproducer for the following issue on:

HEAD commit:    4dce97c6c265 Merge tag 'ext4_for_linus-7.4-rc5' of git://g..
git tree:       git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=13bc88e9580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=fbd0fc734eea62ed
dashboard link: https://syzkaller.appspot.com/bug?extid=daa4cd155cd8696efe4f
compiler:       Debian clang version 22.1.8 (1~deb13u5), Debian LLD 22.1.8
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=112662bd580000

The issue was bisected by AI to:

commit 099ef9ab9203dff327f2d61e44773f9acbc01f13
Author: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Date:   Fri Dec 26 13:45:19 2025 +0000

    fs/ntfs3: implement iomap-based file operations

AI reasoning:   https://syzkaller.appspot.com/ai_job?id=e3505470-e7cd-4afa-9bd4-3a5bf01c3027

AI-generated root cause summary:
`ntfs3` registers iomap folio lifecycle callbacks (`iomap_dirty_folio` and
`iomap_release_folio`) on `ntfs_aops` and `ntfs_aops_cmpr`, which attach a
per-block `struct iomap_folio_state` (`ifs`) to folios whenever
`i_blocks_per_folio(inode, folio) > 1` (such as when NTFS cluster size is
smaller than `PAGE_SIZE`). However, `ntfs_read_folio()` in `fs/ntfs3/inode.c`
directly calls `folio_mark_uptodate(folio)` instead of
`iomap_folio_mark_uptodate(folio)` when `ni->i_valid <= vbo` (and the same
pattern appears in `ni_read_folio_cmpr`, `ntfs_compress_write`, and
`attr_make_nonresident`). If an earlier incomplete or aborted iomap
write/zero-range operation left `ifs` attached to an `!uptodate` folio,
`folio_mark_uptodate()` sets `PG_uptodate` without updating the `ifs->state`
uptodate bitmap. When kswapd later reclaims the clean folio via
`iomap_release_folio()` -> `ifs_free()`, `ifs_is_fully_uptodate(folio, ifs) !=
folio_test_uptodate(folio)` triggers the `WARN_ON_ONCE`.

full analysis:  https://syzkaller.appspot.com/x/ai_root_cause?x=daa4cd155cd8696efe4f

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

The cause commit was identified by AI and may be wrong.
If you agree with it, please also add:
Fixes: 099ef9ab9203 ("fs/ntfs3: implement iomap-based file operations")

------------[ cut here ]------------
ifs_is_fully_uptodate(folio, ifs) != folio_test_uptodate(folio)
WARNING: fs/iomap/buffered-io.c:295 at ifs_free+0x22d/0x2c0 fs/iomap/buffered-io.c:294, CPU#0: syz-executor112/5663
Modules linked in:
CPU: 0 UID: 0 PID: 5663 Comm: syz-executor112 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:ifs_free+0x22d/0x2c0 fs/iomap/buffered-io.c:294
Code: 41 5f 5d e9 55 0a bb ff e8 30 8e 4d ff 90 0f 0b 90 e9 0a ff ff ff e8 22 8e 4d ff 90 0f 0b 90 e9 3a ff ff ff e8 14 8e 4d ff 90 <0f> 0b 90 eb c7 44 89 f9 80 e1 07 80 c1 03 38 c1 0f 8c 3d fe ff ff
RSP: 0018:ffffc90003b2f938 EFLAGS: 00010293
RAX: ffffffff827bc41c RBX: ffff8880147a7f80 RCX: ffff888036eea580
RDX: 0000000000000000 RSI: 0000000000000008 RDI: 0000000000000000
RBP: 00000000827c4201 R08: ffffea00013c5487 R09: 1ffffd4000278a90
R10: dffffc0000000000 R11: fffff94000278a91 R12: dffffc0000000000
R13: 1ffffd4000278a95 R14: 0000000000000008 R15: 0000000000000000
FS:  000055555a32a400(0000) GS:ffff88808a9e9000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f3c023b7000 CR3: 0000000013fb5000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 iomap_release_folio+0x254/0x450 fs/iomap/buffered-io.c:826
 mapping_evict_folio+0x348/0x470 mm/truncate.c:374
 mapping_try_invalidate+0x260/0x4b0 mm/truncate.c:605
 generic_fadvise+0x610/0x750 mm/fadvise.c:157
 vfs_fadvise mm/fadvise.c:184 [inline]
 ksys_fadvise64_64 mm/fadvise.c:197 [inline]
 __do_sys_fadvise64 mm/fadvise.c:209 [inline]
 __se_sys_fadvise64 mm/fadvise.c:207 [inline]
 __x64_sys_fadvise64+0x145/0x190 mm/fadvise.c:207
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f3c023eea2a
Code: 10 00 00 00 48 63 4c 24 30 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 eb a2 e8 f1 18 00 00 90 41 89 ca b8 dd 00 00 00 0f 05 <89> c2 f7 da 3d 00 f0 ff ff b8 00 00 00 00 0f 47 c2 c3 0f 1f 40 00
RSP: 002b:00007ffd9854b3c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000dd
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f3c023eea2a
RDX: 0000000000001000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000004 R11: 0000000000000246 R12: 00007ffd9854c520
R13: 0000000000000000 R14: 0000000000000001 R15: 00007ffd9854b410
 </TASK>

      reply	other threads:[~2026-11-25  9:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 18:56 [syzbot] [iomap?] WARNING in iomap_release_folio syzbot
2026-11-25  9:52 ` syzbot [this message]

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=6b06afdd.9416b02e.106116.000e.GAE@google.com \
    --to=syzbot+daa4cd155cd8696efe4f@syzkaller.appspotmail.com \
    --cc=almaz.alexandrovich@paragon-software.com \
    --cc=brauner@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.