Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp250874lqb; Tue, 16 Apr 2024 14:47:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWDs2XuSyKmfz54AlaHgICGNybA+/F/s01u8xRk/6WmzseNWj/QlIfM5tFF4eyRjLsQhWcl21ZnZYTq83R8W/nwdzQMbksjSTgg+hbX1A== X-Google-Smtp-Source: AGHT+IE7jcPY14fBTSQr5dX8VRJ3HObNWuaEguMf2ZZvwRKwWczudTk/ZME/uGx3agN+0FIKRhSp X-Received: by 2002:a25:ea48:0:b0:dc6:9b89:3f75 with SMTP id o8-20020a25ea48000000b00dc69b893f75mr13175934ybe.40.1713304072655; Tue, 16 Apr 2024 14:47:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713304072; cv=pass; d=google.com; s=arc-20160816; b=nBQ+DN+Uc7KBlrjOarworgxkSlvKuk58RwxUigFrt9tMTxoXVKyQGeggyzBz+bK4XG G80UhdetDIeEYs9mEYBAX2FHWN2KGHTi1hdMxKLHtJtJTCCUQEESfLUt2ewANV4kB/DP MQFrwiQnf16cuYt/pMj2RzeWpDq6sngQQyQ+TjR/063EZdQQEB9nNJFic9c4Pj/UZSiW RSuQCtNPQWxkWC3NDHn0KNkSClHz0IIheONZrOvr7IxkPB3y/IeeZ9tWbhsdu8r/DfGn 73DfSqKXByMkxm02UYzEtIhd8AQC/HC4SJPFGiGkZGbKdIBDSo3Oa3Mo2W+JppfN1PmZ 5OsQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=1Zf16kCX02g95RkQSXOcTNEoREnqvyXOonTJtx7G0/4=; fh=ZUwGF2Xiq/7+seiEO5Dgh1kzjZ4PK63EuEROupdVH1s=; b=Q45PSmSiGLxb39ARxwBmMklLPuW/BAx4JZNIL/nEfFC6RvY2/tkcl3begA5pV3Hq1r K5pDHH1PPEInED2oLNijnY5QR89IZ7grbJaqkEdAeE7NYiJU2SPo2Wb3T8jhRCIXxanK QzzchqUxd+54V/G+xnYXVO6M9CZsxv8Jf1AAYBhqn5QdTHYPHe77v8lIbXzuYIOCfsmW yjWU6JlrYNFADD/C8hrVj3bQ+Q9H5ST8pxqtxK8IBpl0vUItn0YFORmqXbC0TIhD2NR/ +awmQzMwrPQv38C/xWozDzsHIyc/RHtC/r7EVquzAiMQ6M5BQUZUKzhdKBLZTE+iyo/p SeqA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=j3RcKL80; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-147660-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147660-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id r14-20020a056214124e00b0069b7b9d424dsi6201582qvv.474.2024.04.16.14.47.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 14:47:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-147660-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=j3RcKL80; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-147660-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147660-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5D5D31C20B4B for ; Tue, 16 Apr 2024 21:47:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3968513A25E; Tue, 16 Apr 2024 21:47:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="j3RcKL80" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F17F584E01; Tue, 16 Apr 2024 21:47:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713304022; cv=none; b=SlXKx+XDO4SNtc02euFUKfh6EsVRCxq+IlpSN1gfYgsqgnDPrLEN2PP7VMxvLZvpxLr6DebVDe4z/LGSP5a0PvJxgtn+8PEeaw3kFvG0bBjrZWrfw2DmL5eGqp5Uen9GF65FxGxO0kZ+OJTCuoRLk0qrpIiz/Htys78V6Inw7tY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713304022; c=relaxed/simple; bh=AYcLtBXwGHJ1lHYc9yCNHOV9e648ufAKYQk7scG7Fsg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Hbfu7ryWlM4xSNIixThFo3tmP4KtidgUKTMiLH6yfbf5kZnY0KUnwUyKoflmBTbTWVbDqY8QtDZl17jwR0jTlrn7irzJJavbvpSYi2e6ZPyl1payN1R6VnQWIvoZSwD0TzuMx9K7Kgyke7R524s5co8Z0TQWY01g7mre3fnDKVo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=j3RcKL80; arc=none smtp.client-ip=192.198.163.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713304021; x=1744840021; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=AYcLtBXwGHJ1lHYc9yCNHOV9e648ufAKYQk7scG7Fsg=; b=j3RcKL80Bi+5fqQg3GWJ9VIUxF2XqyPKy4rDFLa0Pd3eTxjirZQSK8yA lG3/ztJ1cf9GWQmc0O4KwHfDU7DTOT/X/lrvI+Vl4/CxbVCxSpaupzLUF +a9gZacwOnF9OLWaeSKvFDiEihtn1qX+PYlsYacD2ylfWTG0vmJ1BVbAt fit3OedGbGHNbOifpt+Es2g1GgZ7Su49EeruG9dfM9P5Jm+n+KUrwbumQ zmWMuCevzDhV6L6c+JiyfkwZuXdbD1cCgvnDewk8G6KeuSLgjfiL7dtt4 KqTr8H09Gf/6qbV+z8w+Xp0DbMT22+IzuiY3LV3jeQ0Cx8jkXzCWx38qf A==; X-CSE-ConnectionGUID: MdokQsaNQayuAGeFkLrP+Q== X-CSE-MsgGUID: 1qCj+0mcTp6+wGeINu+T6w== X-IronPort-AV: E=McAfee;i="6600,9927,11046"; a="12553099" X-IronPort-AV: E=Sophos;i="6.07,207,1708416000"; d="scan'208";a="12553099" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2024 14:46:42 -0700 X-CSE-ConnectionGUID: s1a4Z6cJRL2V22y5xiFIww== X-CSE-MsgGUID: bK9wP8dUQouG4fYcXSLgKA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,207,1708416000"; d="scan'208";a="22464251" Received: from vverma7-desk1.amr.corp.intel.com (HELO [192.168.1.200]) ([10.212.14.216]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2024 14:46:41 -0700 From: Vishal Verma Date: Tue, 16 Apr 2024 15:46:18 -0600 Subject: [PATCH v2 3/4] dax/bus.c: Don't use down_write_killable for non-user processes Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240416-vv-dax_abi_fixes-v2-3-d5f0c8ec162e@intel.com> References: <20240416-vv-dax_abi_fixes-v2-0-d5f0c8ec162e@intel.com> In-Reply-To: <20240416-vv-dax_abi_fixes-v2-0-d5f0c8ec162e@intel.com> To: Dan Williams , Dave Jiang , Alison Schofield , Andrew Morton Cc: linux-mm@kvack.org, nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org, Vishal Verma X-Mailer: b4 0.14-dev-5ce50 X-Developer-Signature: v=1; a=openpgp-sha256; l=991; i=vishal.l.verma@intel.com; h=from:subject:message-id; bh=AYcLtBXwGHJ1lHYc9yCNHOV9e648ufAKYQk7scG7Fsg=; b=owGbwMvMwCXGf25diOft7jLG02pJDGlyH/eznQ6+pWqQlbF2O3P16ZOcZuv1fx+ODZZUelDJr T5/u3xDRykLgxgXg6yYIsvfPR8Zj8ltz+cJTHCEmcPKBDKEgYtTACYyhZfhfx5nV2XyapeCRXr5 C7ouPGUP+yo0baK3lMaESw9ZzerP/Gdk6De6+NvljPkOrsdnpKX2fTJhWy/MpXC20st3X/aDqPl hLAA= X-Developer-Key: i=vishal.l.verma@intel.com; a=openpgp; fpr=F8682BE134C67A12332A2ED07AFA61BEA3B84DFF Change an instance of down_write_killable() to a simple down_write() where there is no user process that might want to interrupt the operation. Fixes: c05ae9d85b47 ("dax/bus.c: replace driver-core lock usage by a local rwsem") Reported-by: Dan Williams Signed-off-by: Vishal Verma --- drivers/dax/bus.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index 4e04b228b080..db183eb5ce3a 100644 --- a/drivers/dax/bus.c +++ b/drivers/dax/bus.c @@ -1542,12 +1542,8 @@ static struct dev_dax *__devm_create_dev_dax(struct dev_dax_data *data) struct dev_dax *devm_create_dev_dax(struct dev_dax_data *data) { struct dev_dax *dev_dax; - int rc; - - rc = down_write_killable(&dax_region_rwsem); - if (rc) - return ERR_PTR(rc); + down_write(&dax_region_rwsem); dev_dax = __devm_create_dev_dax(data); up_write(&dax_region_rwsem); -- 2.44.0