From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6662C438029 for ; Wed, 12 Aug 2026 13:12:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786540361; cv=none; b=b7PYXR34ekHRgM5mpD8+yJlMbVFK3p+jXV13q+6KDC7djZa5SaDe0Jk5nf/sdof4tlq5kSqtu9agxvgw2Ft/tO2efwnASYDCu2JdAmHQg7TEbYtet7W+f4KC3dKnXxakBOgTTxoUTPNZHXJTNJK16pWcC8R+cmnkpol4oeMHyQM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786540361; c=relaxed/simple; bh=gThTmeefrz3A43B8pMTKFGT9l9xy/Ljd3z19Ygj2JrY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dT3emTKFNCaYPIWYNaERfNLU3/EzkfB1YJ4D/815qjdg7zJBSGHpHQ3icJaSkoZewuSiJWvgjEXnkd+utUyYLtu9kQJXX1hzt1/w3bLnMFXmmbIX8/FQhTIFf+cV3SKaRquCQwlmijJt9/md3ADBxbpNQBCTIPHsax8RuQLjvGE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SPkKW6Jb; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SPkKW6Jb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F30B1F000E9; Wed, 12 Aug 2026 13:12:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786540360; bh=JA43vQGtccT6sp4qL2p5gqo3GNrXNGk+Tzdfpku8ooo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=SPkKW6Jb4E+W3RoxnWDtIz5DooV7CZt6FbXdWq0vfRLvTh9RDz6i34ntjG5+n4frB r6O/5O4zQchhCaGbu5fKRqbo4MQyGDUjrx9n382FL1D3LWpDZJjDCeTOVwQm+q4c6G BLW4LERHIVPNIE1LJKFOozFftSRKFCkzoHACYFVqMN/lI8SGdMyRweuSrO7cLkLOqH yYfXgYUxF/qb/xnCZ4CxuvtRgJpW5DzntAP+ysn1hiyyIu0qvEqDvEzmZZ6ehCQ9C7 iMf3wciOOFQ7DIv40SgM7ShbCH9lDhdYY4VlWF0Jx98aUxRmuTGnz4PNXTsiNM2y7j obEDmCV2R3PpQ== From: Gao Xiang To: Linus Torvalds Cc: linux-erofs@lists.ozlabs.org, LKML , Gao Xiang , SJ Park , Guenter Roeck , Geert Uytterhoeven Subject: [PATCH] erofs: fix EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS on some UP platforms Date: Wed, 12 Aug 2026 21:11:43 +0800 Message-ID: <20260812131144.30802-1-xiang@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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) ... Let's guard NR_CPUS with SMP instead of using a hardcoded arbitrary CPU uplimit here, similar to commit a3344078101c ("mm: make SPLIT_PTE_PTLOCKS depend on SMP"). The initial report from SJ Park was for m68k [1] (m68k is the only arch without NR_CPUS in Kconfig), and it will be changed in another patch [2]. [1] https://lore.kernel.org/all/anuyFHLUGDjZWY4K@XiangdeMacBook-Pro.local/T/#u [2] https://lore.kernel.org/r/20260731094950.1988084-2-ukleinek@kernel.org Reported-by: SJ Park Closes: https://lore.kernel.org/r/20260728065447.91511-1-sj@kernel.org Reported-by: Guenter Roeck Closes: https://lore.kernel.org/r/87853c96-cc8f-49e6-81b1-02bfe409e372@roeck-us.net Fixes: c9b47e6b2311 ("erofs: cap LZMA stream pool size") Cc: Geert Uytterhoeven Signed-off-by: Gao Xiang --- Hi Linus, Could you apply this Kconfig fix directly since I don't have other urgent patch for 7.2 (so maybe it's unnecessary to have a pull request just for this..) Many thank, Gao Xiang fs/erofs/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/erofs/Kconfig b/fs/erofs/Kconfig index 8ca1767dafb6..2dfc313588d2 100644 --- 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. -- 2.47.3