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 600AC2E40E for ; Wed, 19 Nov 2025 07:08:40 +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=1763536120; cv=none; b=G7af7Vh0y48Mz71Yx0/pUcAGblUAIQyRcDpnbwjqjcATVQLJEVsLIFWCVEFjaPEjwZcSIJye5ivjqacGvQmyjVrs246WVD6ow5GwHfisVq/teOuEb4hukW2zezEU1bPzvWNQJ2kW3toYokX1l6xWeVTt6xXJX+lQaI4gum3jPTI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763536120; c=relaxed/simple; bh=nZBf4m29jUm8uJrYvwBSu0Ab3KRKwWBPjgjsugL5QiY=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=pAnm8StQZ5h+M75ZTDfpW5Cb72SVV13SDrBinlkchWdKV6C4q/zA1bj/ctUkM00winB5auDY7i3h7bKErNjDEUHiA73LzB6iDR0S47cwywDVAnUlvQCuDtQcnHSBVpDAa5NZPdMogInrHItlnc8stn5uQCctJ9SlM5exH1JM02g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iMIwg63S; 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="iMIwg63S" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA803C2BCB6; Wed, 19 Nov 2025 07:08:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763536120; bh=nZBf4m29jUm8uJrYvwBSu0Ab3KRKwWBPjgjsugL5QiY=; h=Date:From:To:Cc:Subject:From; b=iMIwg63Sdq8bPS8Q/rBBN/9ewQwWzqzfV9NdmJXgIf7dO5mSXmxQhfMV6zKNvuMEn D2WWXb8pP2Dvq6U9us/Uul4X9lSzdNQlN5I5pIxvvaZhapYplAAv0ibgXAhMzfjlU7 oTRO0QpvUaDPQ9wV7634+zyPq1x13I/1JIuGZGVnALDOi/5qsEOh8LBfF4ln/n09p1 6MvRWiNYPevmI5ITNmqDIk3zlc/wmgwsYzGtzLuC6X9tQde5RJpEOfmC3Lx6BhRZZ7 KcNnv3IwUyZrMHS2wZ1c13ybi9sDtcbZRc1rXCCFhHrSxlCL9JFbYT4HrjPAPYM9vP cD6Lg061R8P0g== Date: Wed, 19 Nov 2025 09:08:33 +0200 From: Mike Rapoport To: Linus Torvalds Cc: Andrew Morton , Akinobu Mita , Mike Rapoport , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] memblock: fix memblock_estimated_nr_free_pages() for soft-reserved memory Message-ID: 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 Hi Linus, The following changes since commit e9a6fb0bcdd7609be6969112f3fbfcce3b1d4a7c: Linux 6.18-rc5 (2025-11-09 15:10:19 -0800) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock fixes-2025-11-19 for you to fetch changes up to c42af83c59b65d01c0f7a074e450bbbb43b22f0d: memblock: fix memblock_estimated_nr_free_pages() for soft-reserved memory (2025-11-11 18:15:35 +0200) ---------------------------------------------------------------- memblock: fix memblock_estimated_nr_free_pages() for soft-reserved memory The "soft-reserved" memory regions (EFI_MEMORY_SP) are added to the memblock.reserved, but not to the memblock.memory. It causes memblock_estimated_nr_free_pages() to return a value smaller value than expected, or if it underflows, an extremely large value. Calculate the number of estimated free pages using memblock_reserved_kern_size() instead of memblock_reserved_size() to fix the issue. ---------------------------------------------------------------- Akinobu Mita (1): memblock: fix memblock_estimated_nr_free_pages() for soft-reserved memory mm/memblock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- Sincerely yours, Mike.