From patchwork Tue Apr 30 17:44:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Verma, Vishal L" X-Patchwork-Id: 13649811 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7764C4345F for ; Tue, 30 Apr 2024 17:44:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 24FB26B00BF; Tue, 30 Apr 2024 13:44:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 13E136B00C2; Tue, 30 Apr 2024 13:44:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D6A186B00C3; Tue, 30 Apr 2024 13:44:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id A272D6B00C0 for ; Tue, 30 Apr 2024 13:44:48 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 57C3F1A09BA for ; Tue, 30 Apr 2024 17:44:48 +0000 (UTC) X-FDA: 82066923456.06.882F555 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by imf09.hostedemail.com (Postfix) with ESMTP id 19430140005 for ; Tue, 30 Apr 2024 17:44:45 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=g9J420mu; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf09.hostedemail.com: domain of vishal.l.verma@intel.com designates 198.175.65.10 as permitted sender) smtp.mailfrom=vishal.l.verma@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714499086; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=M0ZFjMlgL3Fqgat5FNQqzMdo4ab4pQjSmrLsOtI0Ba0=; b=EDiTs8EA8tPHLdLgpAKZsObsnCI8fqtozMMW7h2/E8dZmmZgYnBNkmIJz8siP57JHw2I92 1T3SqwjeQ5ZKK3IkYTo31IDVpPxSxXQ1PpqlC4kaf5weUNHTWcI7ltzpWjnCaI7DHqMLls 7FPdHVx7W1p33F54YHEPXjLxBXim9mg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714499086; a=rsa-sha256; cv=none; b=78COqnAMmeY5Ktlzb3jDfL//ZhbMVzKUt4+hEqJuW7lpzAqONSEYWbH6lz/5NP21wJcjOJ l4aClZN4lL2RNIDRTPE/uZ4yrD4JORAbvAjUtBcyho6yHsG6bVtpKLpuJLoya7PDOryvBR Xgxp/c5e1v/m1Hh/DxWcfJre0uVRZ88= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=g9J420mu; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf09.hostedemail.com: domain of vishal.l.verma@intel.com designates 198.175.65.10 as permitted sender) smtp.mailfrom=vishal.l.verma@intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714499086; x=1746035086; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=NhTlptPmEedEHUiT46vqy1jTU5giIPfdgp2TteFj/UU=; b=g9J420mu+FtihXXQBbIpA+S0T9Gm8aHjVjcTpqP4x8gV4QkOphQQTSvY c5u51j5vhQHrlhK1SVz9R2lTwHFEtva6NEThd2OzeAyvUqQomJQPiJzmW 0Ne8BH+OBxDnIticxorb+tIVSQClFWVZSeIG5OsA+HmirxTMgR2wli5sm 3pRifsbRB+68jTgVzODDEWToEifIhCyNVkhQ/p6vpHPKo6uqXrihoRDK6 z2IFyT86QjjZSWzbPTv4AsyuPfE+z++BPgtXQ7cbT6ORRicNO2VjCVJKH ewjgcovgzRb/SiDhiSlX5bRfeJ6fAWJAhWspp9KcCQ/xN8a1ukjUeUmyN w==; X-CSE-ConnectionGUID: LqXgPYqeR8mj94Hau+rIpA== X-CSE-MsgGUID: F6ydAs5aSY2MoQdzjwQNCg== X-IronPort-AV: E=McAfee;i="6600,9927,11060"; a="27669840" X-IronPort-AV: E=Sophos;i="6.07,242,1708416000"; d="scan'208";a="27669840" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Apr 2024 10:44:42 -0700 X-CSE-ConnectionGUID: MTZbRtiIT46p1EZt8gC0Xw== X-CSE-MsgGUID: PtnL8bTtQJuz5mXOFvW8pQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,242,1708416000"; d="scan'208";a="26534780" Received: from vverma7-desk1.amr.corp.intel.com (HELO [192.168.1.200]) ([10.212.82.45]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Apr 2024 10:44:42 -0700 From: Vishal Verma Date: Tue, 30 Apr 2024 11:44:25 -0600 Subject: [PATCH v3 3/4] dax/bus.c: Don't use down_write_killable for non-user processes MIME-Version: 1.0 Message-Id: <20240430-vv-dax_abi_fixes-v3-3-e3dcd755774c@intel.com> References: <20240430-vv-dax_abi_fixes-v3-0-e3dcd755774c@intel.com> In-Reply-To: <20240430-vv-dax_abi_fixes-v3-0-e3dcd755774c@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=1045; i=vishal.l.verma@intel.com; h=from:subject:message-id; bh=NhTlptPmEedEHUiT46vqy1jTU5giIPfdgp2TteFj/UU=; b=owGbwMvMwCXGf25diOft7jLG02pJDGmGehxcG/a8TGZ7GGendtTw8nyFaR2CS4KDrHMureQTe 8XOJx7RUcrCIMbFICumyPJ3z0fGY3Lb83kCExxh5rAygQxh4OIUgIl4tTEy/F+18KzNXK/pAbHM YZzhbhWfskIF/QLXnjxRPZ95RabIdob/yWsvbDY4MY9zwd3/egXFfE36dhuc1cQ9lx8WVVhUH3i FGwA= X-Developer-Key: i=vishal.l.verma@intel.com; a=openpgp; fpr=F8682BE134C67A12332A2ED07AFA61BEA3B84DFF X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 19430140005 X-Stat-Signature: taeywsxkyqgqzc4qgzbe57rjdye9dnqq X-Rspam-User: X-HE-Tag: 1714499085-413214 X-HE-Meta: U2FsdGVkX193VtL1HruihO9Z6WKsehUN1IaNhvuF2gV/p0fPwNezZo3kPQVpYTt2vUB6GgjNftj2gjcbhRmFUxtHbRrPQF+tXswQEebzXAPTyMxy0FCEGyuscpnUuXF8nTYiroHKvPoHTnnNlLndMBh56fljqHdY/8JPG/JkXOXffYzqQJ+wuwGSVoQIi7IS3ImWxnFNO2C+oVa3kS3AEPjEmKDq8gRZDKLCBnbyYZSrTF21gY/miTktip5j3RGyikA8VDBv0FKBxyUxrMK4OYiryVwnYD7tPd1nvD18ZianVSz9FBL5vPYSe7pLxxdUD6RBOoTUF0UCZy8kKJLbl4D2l8b4maQV2n/XwY9E2CnbgkqbIylw8FBCdM2rh9hvT0KrW1gfKc/4Ujp9oxTcM7YvCjcph7QTUwgpwZuhshaAsVB5LMt3m+0OHcxqu5i6ey36/LTKUZizhQP/cB/F779FQzCVVQSjyOOD2WoF1iHsgOL0wEJ/i2rgvcttVd87DoVnpTZ5lBD0neYrgX6jfdDPbsd6RwTUbVvLpJkrqmF09ZDrP0au2PN99NiTuVh7CvLZS8fPp6glPGAbLPc6DkapBTyW50pekyXu9N3HBKdS7sOPNhZ3L+XdL/ezB1NAWld/LcJIgVINAqjXgxCqqegEfWHIM2hWOErFB8N8yhNhc39tfGG7Ch2/FP/rLzDvIZq8GY1pvBiEJT32aYwjH35dgLs6MMm2TZcRJ5/ottXEdg4VW65//lbY8synHvZ4YiHKa82SekJ0zGGF7FGPb7n12j6S5yyFFZHEPtDF1gJcZaHPb6GXR8/glCYDREumwBHa9r3mKGxazWY0MCnj0pJHI//69fWCrUBVgXzXumpLOWxCa5Xv2U/4QKWe5Hi20d/xZgudgqqfVf1nk33Zjc4TjRqMepzor9yXT6jFz9fQi+eswPf2wxo/1dGXKRihh/905cAKItzfGiFMSkc vdCrQd8o 8ARBxbVlkpdYWQ0jhzy7XabdJwr+0W3ljD5vzyQl/fNm1DYTLHmpKonfURr/4dxfxL7Zg8U50wk9K328GABsL27AXZZYXCYV//Eby6k5gy5mHwV/hBQinNQwzI6K62mzZFdynFwZr/k9D09THnoBrQbVc9WYakm5fDsOHmlLNOltyZMSmSYhnHSsP2RGS9ObnJka+uMrjLM0oxXJZ0s/NIK2aAKtaaf04FB37CbpdUYtCyJy6HkdHlDbNpQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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 Reviewed-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 e2c7354ce328..0011a6e6a8f2 100644 --- a/drivers/dax/bus.c +++ b/drivers/dax/bus.c @@ -1540,12 +1540,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);