Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp8538194rwd; Tue, 20 Jun 2023 17:10:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5gL8M2dLaldsdfKykN79BAr4KMmAUY+cRUOsUNDTVC0dTgfURwW6BPKOADXYLsP+KUcnWi X-Received: by 2002:a05:6808:2088:b0:39e:dfd7:162 with SMTP id s8-20020a056808208800b0039edfd70162mr7377897oiw.31.1687306207401; Tue, 20 Jun 2023 17:10:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687306207; cv=none; d=google.com; s=arc-20160816; b=PFK4ncK1VlLySIO4GZo/RPwDx6NKsk17NdfqLBZAcYCywCId9N/iXNCOzg93fUHCGr 1Xh+beOJ+48ukiy/ULWXZ/tSjmPxvfj3OgJn0uxmZsuXMZXgXbiIlKPDJ0LvJRQ7SSFS OgCGBzUG+Cd5om6MdIz7MVYOm7KTPGqBgkTsTROWrwKwBoi5Crcu3x4MM7bA7fHJtgQb cn3m/0LExD3iKye7G4oyDEKiHmhqNHePdtNw4EgbF3n8OKe1nHfthlexg3mXJ+38lRw3 cEg5Iirz523L4gE/HgXslwOnXBE5pzKnxeiqkutn+QfYkUK5Rl8kHq3M+VdQrblImJTl /KtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Ii0NUdBB0DNqx4iN/xSAOtcdVUVXwF20DsNdQC+CUE0=; b=lb7MeduqSJcUyi/JqGYWJIpgvVPqhEdWmZs1W9Dfr2GbxPABSstaBTIk1eX2ygWAb0 YC45vwilaiup/eqFxFRNg00SbT3vJx6Pn3dy7ulMBr+RgMJKPBULVts4E1oZSp0af59d wAIJfNpE5SJwUALgsFvloyHqH151V9TAt2eQ1gtFj9gRWx8ta865SZjVGYZnYbX5A07f oXMN+dsgaxKWUtgpW1ltJ4dfPqvtfuqNYvJyoI8IraB1vXV5jsVFHJj2U8KWbFkZTswd 9icoVVdRd1tn/xGgmCSLz3fqqqnoboLLsifRmtZTK6/lxtk+i8cssQJjv/wb1bFEcuvu PMPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=B5GWuKA4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g7-20020a63be47000000b0052c27a0125bsi2743088pgo.738.2023.06.20.17.09.52; Tue, 20 Jun 2023 17:10:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=B5GWuKA4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229593AbjFTXS7 (ORCPT + 99 others); Tue, 20 Jun 2023 19:18:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229544AbjFTXSr (ORCPT ); Tue, 20 Jun 2023 19:18:47 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06C1A1703; Tue, 20 Jun 2023 16:18:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687303126; x=1718839126; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=q1bkxpygv4LAUMocA4P5yZKR1qZoIrHDfX+FBbKE9ls=; b=B5GWuKA4SZotZh+Gd3tYQg4YgDz2G8EjddP1HMfh976RYqOhIeE5Zygc Br6HbBA3l0ZS0hfjifQiOui8zqxOJPNJBNcjUbvn2YTI7SpKCCXG6rBZK bXGPCWm943cE92HTavR3VbCqcUOaDjEuNkToqK/zhmFBgLTPZv/DiIe+L FGP9Bzlaau4CYAX4saS02GBRxo4XdJ/uR9viPD8w6NWOrs6PfELD3/w+e xNi3sbfU+LGXb31RZXM1QkLrR8pZX9Vwb+Z1oLnVbauBf/IqjqXxYn8Ix 9Og6D8gXcnL02+B0/h6hlao+lMR/g9uFKuE5YiC6ESHGa2HEk1lxG6syO g==; X-IronPort-AV: E=McAfee;i="6600,9927,10747"; a="358879758" X-IronPort-AV: E=Sophos;i="6.00,258,1681196400"; d="scan'208";a="358879758" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2023 16:18:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10747"; a="708479549" X-IronPort-AV: E=Sophos;i="6.00,258,1681196400"; d="scan'208";a="708479549" Received: from aschofie-mobl2.amr.corp.intel.com (HELO aschofie-mobl2) ([10.209.112.123]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2023 16:18:44 -0700 Date: Tue, 20 Jun 2023 16:18:43 -0700 From: Alison Schofield To: Tarun Sahu Cc: nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, dan.j.williams@intel.com, vishal.l.verma@intel.com, aneesh.kumar@linux.ibm.com, jaypatel@linux.ibm.com Subject: Re: [PATCH] dax/kmem: Pass valid argument to memory_group_register_static Message-ID: References: <20230620140332.30578-1-tsahu@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230620140332.30578-1-tsahu@linux.ibm.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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 >