[PATCH] erofs: confirm big pcluster before setting extents

Gao Xiang hsiangkao at linux.alibaba.com
Sun Jun 15 15:49:49 AEST 2025


Hi Edward,

On 2025/6/15 13:05, Edward Adam Davis wrote:
> In this case, advise contains Z_EROFS_ADVISE_EXTENTS,
> Z_EROFS_ADVISE_BIG_PCLUSTER_1, Z_EROFS_ADVISE_BIG_PCLUSTER_2 at the same
> time, and following 1 and 2 are met, WARN_ON_ONCE(iter->iomap.offset >
> iter->pos) in iomap_iter_done() is triggered.
> 
> 1. When Z_EROFS_ADVISE_EXTENTS exists, z_erofs_fill_inode_lazy() is exited
>     after z_extents is set, which skips the check of big pcluster;
> 2. When the condition "lstart < lend" is met in z_erofs_map_blocks_ext(),
>     m_la is updated, and m_la is used to update iomap->offset in
>     z_erofs_iomap_begin_report();
> 
> Fixes: 1d191b4ca51d ("erofs: implement encoded extent metadata")
> Reported-by: syzbot+d8f000c609f05f52d9b5 at syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=d8f000c609f05f52d9b5
> Tested-by: syzbot+d8f000c609f05f52d9b5 at syzkaller.appspotmail.com
> Signed-off-by: Edward Adam Davis <eadavis at qq.com>

Z_EROFS_ADVISE_BIG_PCLUSTER_1 and Z_EROFS_ADVISE_BIG_PCLUSTER_2 are
valid only for !Z_EROFS_ADVISE_EXTENTS, so I don't think this change
is a proper solution.

 From the commit message above, I don't get the root cause either.
Anyway, I will seek time to look into this issue later.

Thanks,
Gao Xiang


More information about the Linux-erofs mailing list