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-next>] [day] [month] [year] [list]
Message-Id: <20230620140332.30578-1-tsahu@linux.ibm.com>
Date:   Tue, 20 Jun 2023 19:33:32 +0530
From:   Tarun Sahu <tsahu@...ux.ibm.com>
To:     nvdimm@...ts.linux.dev, linux-cxl@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, dave.jiang@...el.com,
        dan.j.williams@...el.com, vishal.l.verma@...el.com,
        aneesh.kumar@...ux.ibm.com, jaypatel@...ux.ibm.com,
        tsahu@...ux.ibm.com
Subject: [PATCH] dax/kmem: Pass valid argument to memory_group_register_static

memory_group_register_static takes maximum number of pages as the argument
while dev_dax_kmem_probe passes total_len (in bytes) as the argument.

Signed-off-by: Tarun Sahu <tsahu@...ux.ibm.com>
---
 drivers/dax/kmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dax/kmem.c b/drivers/dax/kmem.c
index 7b36db6f1cbd..898ca9505754 100644
--- a/drivers/dax/kmem.c
+++ b/drivers/dax/kmem.c
@@ -99,7 +99,7 @@ static int dev_dax_kmem_probe(struct dev_dax *dev_dax)
 	if (!data->res_name)
 		goto err_res_name;
 
-	rc = memory_group_register_static(numa_node, total_len);
+	rc = memory_group_register_static(numa_node, PFN_UP(total_len));
 	if (rc < 0)
 		goto err_reg_mgid;
 	data->mgid = rc;
-- 
2.31.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ