Re: [PATCH] erofs: apply the stacked fs check to extra file-backed devices
From: Gao Xiang
Date: Mon Nov 02 2026 - 07:47:12 EST
On Fri, Oct 30, 2026 at 12:52:44PM +0900, Daejun Park via B4 Relay wrote:
> From: Daejun Park <daejun7.park@xxxxxxxxxxx>
>
> erofs_fc_fill_super() rejects a file-backed mount whose image is on a
> file-backed EROFS or on a filesystem with s_stack_depth set. This
> bounds the nesting of reads. Extra devices given by device= are not
> checked. File-backed mounts can still nest through them without limit.
>
> Apply the same check to extra devices.
>
> Fixes: fb176750266a ("erofs: add file-backed mount support")
> Signed-off-by: Daejun Park <daejun7.park@xxxxxxxxxxx>
Reviewed-by: Gao Xiang <xiang@xxxxxxxxxx>
> ---
> Tested on erofs dev in a QEMU guest with KASAN and lockdep:
>
> - Blobs on a file-backed EROFS or overlayfs now get -EINVAL.
>
> - Blobs on XFS or a loop-mounted EROFS still mount and read back.
>
> - Lockdep warns about devs->rwsem vs i_rwsem for a device= path inside
> an EROFS mount, with or without this patch.
What does that mean? Can you explain more about this lockdep issue?
Thanks,
Gao Xiang