lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220415021511.umtrspqwovitnrtm@offworld>
Date:   Thu, 14 Apr 2022 19:15:11 -0700
From:   Davidlohr Bueso <dave@...olabs.net>
To:     Peng Liu <liupeng256@...wei.com>
Cc:     mike.kravetz@...cle.com, david@...hat.com,
        akpm@...ux-foundation.org, yaozhenguo1@...il.com,
        baolin.wang@...ux.alibaba.com, songmuchun@...edance.com,
        liuyuntao10@...wei.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 4/4] hugetlb: Clean up hugetlb_cma_reserve

On Wed, 13 Apr 2022, Peng Liu wrote:

>Use more generic functions to deal with issues related to online
>nodes. The changes will make the code simplified.
>
>Signed-off-by: Peng Liu <liupeng256@...wei.com>
>Reviewed-by: Muchun Song <songmuchun@...edance.com>
>Reviewed-by: Baolin Wang <baolin.wang@...ux.alibaba.com>
>Reviewed-by: Mike Kravetz <mike.kravetz@...cle.com>

Reviewed-by: Davidlohr Bueso <dave@...olabs.net>

>---
> mm/hugetlb.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/mm/hugetlb.c b/mm/hugetlb.c
>index 2e4d8d9fb7c6..4c529774cc08 100644
>--- a/mm/hugetlb.c
>+++ b/mm/hugetlb.c
>@@ -6953,7 +6953,7 @@ void __init hugetlb_cma_reserve(int order)
>		if (hugetlb_cma_size_in_node[nid] == 0)
>			continue;
>
>-		if (!node_state(nid, N_ONLINE)) {
>+		if (!node_online(nid)) {

You could update mm/page_ext.c as well

>			pr_warn("hugetlb_cma: invalid node %d specified\n", nid);
>			hugetlb_cma_size -= hugetlb_cma_size_in_node[nid];
>			hugetlb_cma_size_in_node[nid] = 0;
>@@ -6992,7 +6992,7 @@ void __init hugetlb_cma_reserve(int order)
>	}
>
>	reserved = 0;
>-	for_each_node_state(nid, N_ONLINE) {
>+	for_each_online_node(nid) {

... and arch/ia64/kernel/uncached.c for this.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ