[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZJIz07hQiXr/MghO@aschofie-mobl2>
Date: Tue, 20 Jun 2023 16:18:43 -0700
From: Alison Schofield <alison.schofield@...el.com>
To: Tarun Sahu <tsahu@...ux.ibm.com>
Cc: nvdimm@...ts.linux.dev, linux-cxl@...r.kernel.org,
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
Subject: Re: [PATCH] dax/kmem: Pass valid argument to
memory_group_register_static
On Tue, Jun 20, 2023 at 07:33:32PM +0530, Tarun Sahu wrote:
> 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.
This sounds like a fix. An explanation of the impact and a fixes tag
may be needed. Also, wondering how you found it.
Alison
>
> 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