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] [day] [month] [year] [list]
Message-ID: <20200616223131.33828-3-song.bao.hua@hisilicon.com>
Date:   Wed, 17 Jun 2020 10:31:31 +1200
From:   Barry Song <song.bao.hua@...ilicon.com>
To:     <akpm@...ux-foundation.org>, <mike.kravetz@...cle.com>
CC:     <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
        <linuxarm@...wei.com>, Barry Song <song.bao.hua@...ilicon.com>,
        "Roman Gushchin" <guro@...com>
Subject: [PATCH v2 2/2] mm: hugetlb: fix the name of hugetlb CMA

once we enable CMA_DEBUGFS, we will get the below errors:
directory 'cma-hugetlb' with parent 'cma' already present

we should have different names for different CMA areas.

Acked-by: Roman Gushchin <guro@...com>
Reviewed-by: Mike Kravetz <mike.kravetz@...cle.com>
Signed-off-by: Barry Song <song.bao.hua@...ilicon.com>
---
 -v2:
  rebase to 5.8-rc1
  add acked-by and reviewed-by

 mm/hugetlb.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 57ece74e3aae..d54bb7e35005 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -5692,12 +5692,14 @@ void __init hugetlb_cma_reserve(int order)
 	reserved = 0;
 	for_each_node_state(nid, N_ONLINE) {
 		int res;
+		char name[20];
 
 		size = min(per_node, hugetlb_cma_size - reserved);
 		size = round_up(size, PAGE_SIZE << order);
 
+		snprintf(name, 20, "hugetlb%d", nid);
 		res = cma_declare_contiguous_nid(0, size, 0, PAGE_SIZE << order,
-						 0, false, "hugetlb",
+						 0, false, name,
 						 &hugetlb_cma[nid], nid);
 		if (res) {
 			pr_warn("hugetlb_cma: reservation failed: err %d, node %d",
-- 
2.23.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ