From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8E39A433AD for ; Mon, 30 Mar 2026 01:32:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774834372; cv=none; b=np9QclV+OPC9lx9KhVwjofc08U/judyIQN9CMyrlu/+6B7+2AV0V2b0ItRvVaQzcA3J4RJNk3cT07Oohv2uhNIzGEcmsBQcBnGbv/s2BV/k4Psu6sb+lYjEDc0sRzqfFVDYczkuyD/X0HVsrSL2rCx3oLMtpIje17J4hY2KRu3g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774834372; c=relaxed/simple; bh=5Y+t+MMtsA2kRKlu7yUW+ZDUXrORqHIVBhIHlTBE8H4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=duuYjYxCzGxGH1k9KDMF0L+CGWgdGd9W2/SEf03ZFFZjrdgfKYHIoysHuvqBz78bm24eE8WUDcIjmXxoOhvEk7XehhpOazdLNjtwN1bAWqbkB6det91CceWCU1829Uzt7UKSknJ4N+2dcWejEm/9VWvSVPTo+KH5VRXFzj5KUQ0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=b0S5pvcc; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="b0S5pvcc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC218C116C6; Mon, 30 Mar 2026 01:32:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774834372; bh=5Y+t+MMtsA2kRKlu7yUW+ZDUXrORqHIVBhIHlTBE8H4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=b0S5pvccwm2rqFD79GDl7WUA3OnwcIHeJEt926WI+bVBOBoa30Oib9f3dgkn/QxS8 MAUZLTJdGnkTdvtdQl1ylP6bStvI1esAut1FvqGnDb3gqh8gqFZ2Oreivw5+ExZ/Io nzYHY1WvTiLbFdl+s3bNFTsBCCluxWHYGpjq6z7ZYZjZ6r4/nhfvyqTr/TDwLEJhog 3m+4Mwtqi/b5vqzbdV6Y1BWacx6CGUMOm/zb3xt/II40DfuoIhYDUyafgxh2IpWcJ0 RtMwzOn7Bgy6mamsLdYxph+ocTfwYAIEc5zFY14P5KeX0xh57bWFLyUipFrg6YrGf4 //HRdakABfFiQ== Date: Mon, 30 Mar 2026 10:32:50 +0900 From: "Harry Yoo (Oracle)" To: Qi Zheng Cc: hannes@cmpxchg.org, hughd@google.com, mhocko@suse.com, roman.gushchin@linux.dev, shakeel.butt@linux.dev, muchun.song@linux.dev, david@kernel.org, ljs@kernel.org, ziy@nvidia.com, yosry.ahmed@linux.dev, imran.f.khan@oracle.com, kamalesh.babulal@oracle.com, axelrasmussen@google.com, yuanchu@google.com, weixugc@google.com, chenridong@huaweicloud.com, mkoutny@suse.com, akpm@linux-foundation.org, hamzamahfooz@linux.microsoft.com, apais@linux.microsoft.com, lance.yang@linux.dev, bhe@redhat.com, usamaarif642@gmail.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Qi Zheng Subject: Re: [PATCH v3 3/3] mm: memcontrol: correct the nr_pages parameter type of mem_cgroup_update_lru_size() Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Mar 27, 2026 at 06:16:30PM +0800, Qi Zheng wrote: > From: Qi Zheng > > The nr_pages parameter of mem_cgroup_update_lru_size() represents a page > count. During the reparenting of LRU folios, the value passed to it can > potentially exceed the maximum value of a 32-bit integer. It should be > declared as long instead of int to match the types used in lruvec size > accounting and to prevent possible overflow. > > Update the parameter type to long to ensure correctness. > > Signed-off-by: Qi Zheng > --- Looks good to me, Reviewed-by: Harry Yoo (Oracle) -- Cheers, Harry / Hyeonggon