From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-98.freemail.mail.aliyun.com (out30-98.freemail.mail.aliyun.com [115.124.30.98]) (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 8ACDA1D5CFF for ; Thu, 16 Jan 2025 08:33:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.98 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737016412; cv=none; b=deRQw0OrnHepuNaKCjhdGtnW8p/knumN8qCX46Q1JBw0VzBE83Qx3AB4RiRrE7Z3Dno9ppgpUVRWI3wDewEkVvJOHgWq0L7DZqXRUXtnYekPr75DYEAbProJ8SkE8NoflBjWkwv7afaf2X0iaFCILmikk2MceT5FBXuo/0XQRkY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737016412; c=relaxed/simple; bh=hmBVJqFpqY/imiMDvtTMhk+VKVf4HBK6q4FG3Ppp/Ro=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=sMzjYUVGEhxkPCTNfnDJo+a+yrBZ7R0+VWTmzeLCH0ttQZctfbdyc6g+yGcdSijrdHjWhhS4o1GH01T3pygHqoIYbxkuOWyI05IxsVmOOehQCitoz1wgMlbc0hl/IjDZOEc0DcUnpriMoN1d4s2gzlau5FJ9oYaPaDvZ9P/SPSM= 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=pFjlOeJ2; arc=none smtp.client-ip=115.124.30.98 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="pFjlOeJ2" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1737016407; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=PHfQkkB55ebGdxpOI6zf43XLyTVnn+B5ouE5AZYqxj8=; b=pFjlOeJ2wQuowjPEunvaIRbe5T/UHvFjYo7Q5q1dScKzS7MUCmxzvLBoWY4Vs0UR6/94M3omQjbOOmuHo1w9heTGC+e8eEdj3Da17C64vdu4o3dVpiMkIA0ouJgUn0l8olE94XQR5lU1IBKOFpEbOPrBq27iaQPpXXcXMc1/WZA= Received: from 30.221.130.221(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0WNl7TR5_1737016405 cluster:ay36) by smtp.aliyun-inc.com; Thu, 16 Jan 2025 16:33:26 +0800 Message-ID: Date: Thu, 16 Jan 2025 16:33:25 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] erofs: fix potential return value overflow of z_erofs_shrink_scan() To: Chao Yu , linux-erofs@lists.ozlabs.org Cc: LKML References: <20250114040058.459981-1-hsiangkao@linux.alibaba.com> <11ffcd03-c3ce-4d2b-8360-1968092f72c1@kernel.org> From: Gao Xiang In-Reply-To: <11ffcd03-c3ce-4d2b-8360-1968092f72c1@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2025/1/16 16:31, Chao Yu wrote: > On 1/14/25 12:00, Gao Xiang wrote: >> z_erofs_shrink_scan() could return small numbers due to the mistyped >> `freed`. >> >> Although I don't think it has any visible impact. > > Agreed, it's an extreme case... Yeah... also thanks for the review. Thanks, Gao Xiang