Re: [PATCH] erofs: fix EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS on some UP platforms
From: Gao Xiang
Date: Wed Aug 12 2026 - 10:14:45 EST
Hi Geert,
On Wed, Aug 12, 2026 at 03:34:58PM +0200, Geert Uytterhoeven wrote:
> Hi Gao,
>
> Thanks for your patch!
>
> On Wed, 12 Aug 2026 at 15:12, Gao Xiang <xiang@xxxxxxxxxx> wrote:
> > CONFIG_NR_CPUS doesn't define on some UP platforms (e.g. arm), so this
> > can cause make oldconfig to loop indefinitely when CONFIG_SMP=n:
> >
> > $ make ARCH=arm allmodconfig
> > $ sed -i "/CONFIG_SMP=y/d" .config
> > $ sed -i "/CONFIG_EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS.*/d" .config
> >
> > EROFS LZMA default maximum decompression streams (EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS) [0] (NEW)
> > EROFS LZMA default maximum decompression streams (EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS) [0] (NEW)
> > ...
>
> This also fixes EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS silently becoming
> zero (and thus breaking decompression completely?) for "automatic"
> configs like "make allmodconfig" or "make olddefconfig" on architectures
> where NR_CPUS depends on SMP (which is most of them).
Yeah, unfortunately..
>
> >
...
> >
> > Reported-by: SJ Park <sj@xxxxxxxxxx>
> > Closes: https://lore.kernel.org/r/20260728065447.91511-1-sj@xxxxxxxxxx
> > Reported-by: Guenter Roeck <groeck7@xxxxxxxxx>
> > Closes: https://lore.kernel.org/r/87853c96-cc8f-49e6-81b1-02bfe409e372@xxxxxxxxxxxx
> > Fixes: c9b47e6b2311 ("erofs: cap LZMA stream pool size")
> > Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> > Signed-off-by: Gao Xiang <xiang@xxxxxxxxxx>
>
> Tested-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Thanks!
Thanks,
Gao Xiang
>
> > --- a/fs/erofs/Kconfig
> > +++ b/fs/erofs/Kconfig
> > @@ -134,7 +134,8 @@ config EROFS_FS_ZIP_LZMA
> > config EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS
> > int "EROFS LZMA default maximum decompression streams"
> > depends on EROFS_FS_ZIP_LZMA
> > - range 1 NR_CPUS
> > + range 1 NR_CPUS if SMP
> > + range 1 1 if !SMP
> > default 16
> > help
> > By default EROFS allocates one LZMA decompression stream per CPU.
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
>