From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-112.freemail.mail.aliyun.com (out30-112.freemail.mail.aliyun.com [115.124.30.112]) (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 AB7FB18E025; Tue, 21 Apr 2026 02:03:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.112 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776737022; cv=none; b=fVIOhmjyaB42qVA5sbGOBR8s4S2oNFAeAB+2ApBj0wwNU5bi2LShUCI/DVV2Id3XHhla3G5cLVhQKM5PPzRkM4N0D60sZEtuS350OmtOiHlSL/b9LMP/80rGuBDnEPm8fI9xnYLnvPFn/yN4leCH0m3ApcAVbbEgT/G8ZKs00ho= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776737022; c=relaxed/simple; bh=dHUjxAOXkLVdU/zS2QOs1dhm6nRPmHFNN046VJ1KWAw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=H1rbHGWQLpTzZERNvd6cEAQJ/2eWU4YagXOr/k5RiaBn9M8AvkvnfsCX51pxhm2UEt4kJrAOcMQLK42/UDvBUilKXu6WhwvG3nKf/jdWQCViMe3FQX4LwrqRCWXcPPPr8UktkWBE64q6O8Sn4OEuIEsFp5ROYmRIjucZbiR1Ec8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=Mz7h+f6q; arc=none smtp.client-ip=115.124.30.112 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="Mz7h+f6q" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1776737017; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=PT9p61QumOTma43BB/QkhxMPjLowSNcnP2HWwqiAW7s=; b=Mz7h+f6q7ZA1BF3oQNkrVU7UbZTr7CMuXCT0DIWoi+VCCdQ35kElIOcTcAguUsHvN3ktm8aqx4z/RpCEYSSPpz2ccbrvcQelaeDr6YT0XOh5o7vt3Ga8Z2TmAFCICJMeq3GXpXX7PwRMUHDj2UfuXXf8pUOUajx9iW5xpS3oMu4= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033045098064;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0X1RNrF5_1776737016; Received: from 30.221.132.26(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0X1RNrF5_1776737016 cluster:ay36) by smtp.aliyun-inc.com; Tue, 21 Apr 2026 10:03:36 +0800 Message-ID: <78d564f5-5511-4c67-b6b4-6670b3babbbf@linux.alibaba.com> Date: Tue, 21 Apr 2026 10:03:34 +0800 Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH AUTOSEL 7.0-6.12] erofs: ensure all folios are managed in erofs_try_to_free_all_cached_folios() To: Sasha Levin , patches@lists.linux.dev, stable@vger.kernel.org Cc: Zhan Xusheng , Chunhai Guo , xiang@kernel.org, chao@kernel.org, linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20260420132314.1023554-1-sashal@kernel.org> <20260420132314.1023554-198-sashal@kernel.org> From: Gao Xiang In-Reply-To: <20260420132314.1023554-198-sashal@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2026/4/20 21:19, Sasha Levin wrote: > From: Zhan Xusheng > > [ Upstream commit 5de6951fedb29700ace53b283ccb951c8f712d12 ] > > folio_trylock() in erofs_try_to_free_all_cached_folios() may > successfully acquire the folio lock, but the subsequent check > for erofs_folio_is_managed() can skip unlocking when the folio > is not managed by EROFS. > > As Gao Xiang pointed out, this condition should not happen in > practice because compressed_bvecs[] only holds valid cached folios > at this point — any non-managed folio would have already been > detached by z_erofs_cache_release_folio() under folio lock. > > Fix this by adding DBG_BUGON() to catch unexpected folios > and ensure folio_unlock() is always called. > > Suggested-by: Gao Xiang > Signed-off-by: Zhan Xusheng > Reviewed-by: Gao Xiang > Reviewed-by: Chunhai Guo > Signed-off-by: Gao Xiang > Signed-off-by: Sasha Levin > --- > > LLM Generated explanations, may be completely bogus: > > Now I have a complete picture. Let me compile my analysis. This is NOT a bugfix, but I don't mind if such random patch backports to stable kernels. Thanks, Gao Xiang