From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+d8f000c609f05f52d9b5@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [iomap?] [erofs?] WARNING in iomap_iter (5)
Date: Sun, 15 Jun 2025 11:56:41 +0800 [thread overview]
Message-ID: <tencent_70C092DB0661498AEEF56EC78C90E7CA0606@qq.com> (raw)
In-Reply-To: <684cb499.a00a0220.c6bd7.0010.GAE@google.com>
#syz test
diff --git a/fs/erofs/zmap.c b/fs/erofs/zmap.c
index 14ea47f954f5..664611cca689 100644
--- a/fs/erofs/zmap.c
+++ b/fs/erofs/zmap.c
@@ -686,7 +686,17 @@ static int z_erofs_fill_inode_lazy(struct inode *inode)
vi->z_tailextent_headlcn = 0;
goto done;
}
+
vi->z_advise = le16_to_cpu(h->h_advise);
+ if (!erofs_sb_has_big_pcluster(EROFS_SB(sb)) &&
+ vi->z_advise & (Z_EROFS_ADVISE_BIG_PCLUSTER_1 |
+ Z_EROFS_ADVISE_BIG_PCLUSTER_2)) {
+ erofs_err(sb, "per-inode big pcluster without sb feature for nid %llu",
+ vi->nid);
+ err = -EFSCORRUPTED;
+ goto out_put_metabuf;
+ }
+
vi->z_lclusterbits = sb->s_blocksize_bits + (h->h_clusterbits & 15);
if (vi->datalayout == EROFS_INODE_COMPRESSED_FULL &&
(vi->z_advise & Z_EROFS_ADVISE_EXTENTS)) {
@@ -711,14 +721,6 @@ static int z_erofs_fill_inode_lazy(struct inode *inode)
goto out_put_metabuf;
}
- if (!erofs_sb_has_big_pcluster(EROFS_SB(sb)) &&
- vi->z_advise & (Z_EROFS_ADVISE_BIG_PCLUSTER_1 |
- Z_EROFS_ADVISE_BIG_PCLUSTER_2)) {
- erofs_err(sb, "per-inode big pcluster without sb feature for nid %llu",
- vi->nid);
- err = -EFSCORRUPTED;
- goto out_put_metabuf;
- }
if (vi->datalayout == EROFS_INODE_COMPRESSED_COMPACT &&
!(vi->z_advise & Z_EROFS_ADVISE_BIG_PCLUSTER_1) ^
!(vi->z_advise & Z_EROFS_ADVISE_BIG_PCLUSTER_2)) {
next prev parent reply other threads:[~2025-06-15 4:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-13 23:30 syzbot
2025-06-14 3:06 ` Edward Adam Davis
2025-06-14 3:54 ` syzbot
2025-06-14 9:46 ` syzbot
2025-06-15 5:05 ` [PATCH] erofs: confirm big pcluster before setting extents Edward Adam Davis
2025-06-15 5:49 ` Gao Xiang
2025-06-19 3:53 ` [syzbot] [iomap?] [erofs?] WARNING in iomap_iter (5) Gao Xiang
2025-06-19 4:29 ` syzbot
2025-06-15 3:26 ` Edward Adam Davis
2025-06-15 4:02 ` syzbot
2025-06-15 3:56 ` Edward Adam Davis [this message]
2025-06-15 4:24 ` syzbot
2025-06-19 3:28 ` [PATCH] erofs: refuse crafted out-of-file-range encoded extents Gao Xiang
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=tencent_70C092DB0661498AEEF56EC78C90E7CA0606@qq.com \
--to=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+d8f000c609f05f52d9b5@syzkaller.appspotmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®