Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3001566rwd; Fri, 2 Jun 2023 19:16:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ45jRMQXbScnfB+oTxhNoR3oyPnC/YlHkaEdXgungSnLr2QiWj16r8oP3TqwsPxT3u6FveT X-Received: by 2002:a05:6a00:b84:b0:64d:4a94:1a60 with SMTP id g4-20020a056a000b8400b0064d4a941a60mr18262751pfj.18.1685758608675; Fri, 02 Jun 2023 19:16:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685758608; cv=none; d=google.com; s=arc-20160816; b=Ul4OgwbwE6Q5x2ITxdjL4QgmKnk/7rt4PlvIiyKdeNvXbwhDQjYlxJ3sbBYZuOgsV8 mHGKQMo8n5WErjUcT2odatenvKYgnPrDjlO7eaa8fM62m0d2MIMAXhBHF+j2dJl4g+bv 2j4KoWnkF9eqEwljubm/Gt2m/L2LBoLKYOD/lCCrabweWQeb0Pgs6NrTQLBp34+ppXTJ CzsaWJe4h2om6Qp4ms1fRHS1avzDE9GrSA0d5qSipQY+C/a1piN9apFS/xnq/v3YdtXS wilDvY0K7y15SvXDuukqymh6bZCQfPkeeynjM12kvQ15H52TKRQ+MfOmBmDirNoP0fiv cUKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:dkim-signature; bh=vHs/1+mkDIBkgVQQXazp8Z5Y45sJycI1BsPHWOK71PE=; b=DtCag6YpnY6K1eLKgWSfDS6CabLJhUQz7Ej/lSJl5bmRzjmQ4K7r0sBHfJUHp9HaW2 iWr7rZVjC75Wo3uoqGojAgNJmz59mADokt3HvQ2MrQO07Py7rSUo/oru8nfWYNt0gV6w /q3Ggxbq/HcM2j77+KenUrwgNWOYwE0wUPPLdKCQYAb6xWPnlgyE2BuMS+dVjqYjhkmc 1LzLFfRRedgpDCJdrId/Xg9Zreise2SSgCqzrUpi6Fh2Lbm7T6PxY8yZ4tea/l3xJfiY Wuu5hsuW+C3b4Qisk/ehbYQi8dnZ14bwLlckDqirkM4e7UB2diz5WOIt2vfvSZCDYoER QT9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nScQHy2G; 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 x6-20020a626306000000b00640f04eb325si1626908pfb.229.2023.06.02.19.16.34; Fri, 02 Jun 2023 19:16:48 -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=nScQHy2G; 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 S236903AbjFCCJc (ORCPT + 99 others); Fri, 2 Jun 2023 22:09:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229802AbjFCCJ3 (ORCPT ); Fri, 2 Jun 2023 22:09:29 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8D16E4D; Fri, 2 Jun 2023 19:09:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685758168; x=1717294168; h=from:subject:date:message-id:mime-version: content-transfer-encoding:to:cc; bh=H0AeSXOoLm6d+sBF/QPZvpAaFBwHsrKQzLumiIp5WZ4=; b=nScQHy2GwrIYh2HSzMSpCqZfp+83VBGFmGGqbwlRj6Lix0vh7Riwlxz3 NCrmpeWWhOdh+rvo1UfUFoQWXMFYVg3dH1XW52WlVsglr2NaQye28pMEZ ZESPt/tpUlfX7WZsIiQWNkuI/1RbhHqcC0Z2U9F6osB2Hh8jgK++wYeO7 yevvWKxc1ED8LMGUamAghhezzL7/pDnrXLbUvbFDmvQzY8IHJUZN2wHtA B01zKd+36/KHYZsfr0hekK8+P4OlPPj+stKPaYi1UuqNhPoUizfpKifUc fjXc/Cm2lpcz1/QbqPgHRc4cp9cZyjEyOg3EKwwgX4PF9sJxZ1IcPn7j6 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10729"; a="340649428" X-IronPort-AV: E=Sophos;i="6.00,214,1681196400"; d="scan'208";a="340649428" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2023 19:09:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10729"; a="852354408" X-IronPort-AV: E=Sophos;i="6.00,214,1681196400"; d="scan'208";a="852354408" Received: from iweiny-mobl.amr.corp.intel.com (HELO localhost) ([10.212.97.230]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2023 19:09:26 -0700 From: Ira Weiny Subject: [PATCH RFC 0/4] dax: Clean up dax_region references Date: Fri, 02 Jun 2023 19:09:20 -0700 Message-Id: <20230602-dax-region-put-v1-0-d8668f335d45@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIANCgemQC/x2NQQqDQAxFryJZNzATodpuCz2A29JFZkx1Fp1KY osg3r2jy8f7j7+CiSYxuFYrqPySpU8u4E8VxJHzIJj6wkCOand2hD0vqDKUGU7fGRuK1F583cT goUSBTTAo5zju2ZttFt3FpPJKy/H0gO5+g+e2/QFT0YkefgAAAA== To: Dan Williams , Vishal Verma , Dave Jiang , Andrew Morton , Joao Martins , Jonathan Cameron Cc: Yongqiang Liu , Paul Cassella , linux-kernel@vger.kernel.org, nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org, Ira Weiny X-Mailer: b4 0.13-dev-9a8cd X-Developer-Signature: v=1; a=ed25519-sha256; t=1685758165; l=1350; i=ira.weiny@intel.com; s=20221211; h=from:subject:message-id; bh=H0AeSXOoLm6d+sBF/QPZvpAaFBwHsrKQzLumiIp5WZ4=; b=PjRZrjIiB58OFu6WAQdcDL3Xejhg8ixrdE5f89yqGxPlQfRinmET22nVsPyNarG24GyR2xccf dB0c8u+VKbMANqBhmPQqFxwwEe0qVe05gadf2596QxTAPXXTClSoZD8 X-Developer-Key: i=ira.weiny@intel.com; a=ed25519; pk=noldbkG+Wp1qXRrrkfY1QJpDf7QsOEthbOT7vm0PqsE= X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 In[*] Yongqiang Liu presented a fix to the reference counting associated with the dax_region in hmem. At the time it was thought the patch was unnecessary because dax_region_unregister() call would properly handle reference counting. Upon closer inspection Paul noted that this was not the case. In fact Yongqiang's patch was correct but there were other issues as well. This series includes Yongqiang's patch and breaks up additional fixes which can be backported if necessary followed by a final patch which simplifies the reference counting. [*] https://lore.kernel.org/all/20221203095858.612027-1-liuyongqiang13@huawei.com/ Signed-off-by: Ira Weiny --- Ira Weiny (3): dax/bus: Fix leaked reference in alloc_dax_region() dax/cxl: Fix refcount leak in cxl_dax_region_probe() dax/bus: Remove unnecessary reference in alloc_dax_region() Yongqiang Liu (1): dax/hmem: Fix refcount leak in dax_hmem_probe() drivers/dax/bus.c | 6 +++++- drivers/dax/cxl.c | 7 +------ drivers/dax/hmem/hmem.c | 7 +------ drivers/dax/pmem.c | 8 +------- 4 files changed, 8 insertions(+), 20 deletions(-) --- base-commit: 921bdc72a0d68977092d6a64855a1b8967acc1d9 change-id: 20230602-dax-region-put-72c289137cb1 Best regards, -- Ira Weiny