From patchwork Tue Apr 16 21:46:18 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: 13632641 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 E94CDC04FFF for ; Tue, 16 Apr 2024 21:47:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6F4556B0093; Tue, 16 Apr 2024 17:47:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6A7056B0095; Tue, 16 Apr 2024 17:47:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 482106B0098; Tue, 16 Apr 2024 17:47:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 2539B6B0093 for ; Tue, 16 Apr 2024 17:47:06 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id ED5FC1C11B2 for ; Tue, 16 Apr 2024 21:47:05 +0000 (UTC) X-FDA: 82016730810.02.FC483CE Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by imf26.hostedemail.com (Postfix) with ESMTP id AB49C140005 for ; Tue, 16 Apr 2024 21:47:03 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=DkB6687o; spf=pass (imf26.hostedemail.com: domain of vishal.l.verma@intel.com designates 192.198.163.12 as permitted sender) smtp.mailfrom=vishal.l.verma@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1713304023; 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=1Zf16kCX02g95RkQSXOcTNEoREnqvyXOonTJtx7G0/4=; b=buE9bEk1PYzGCiPxlB+XNfxZR9Tu6j4D25pzsiMKKAbzR8A+K9M3bVm+ndEph3Jg9GiS4r Pq6vk3csrLpujbafjcgIxq7l89i4LkEWoE/WnTqe/EG3jTGWnDaU451JkfSyjFxYr4QtmL hEO/d6PoxPuykMZYx0LYl9+XTll7bpE= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=DkB6687o; spf=pass (imf26.hostedemail.com: domain of vishal.l.verma@intel.com designates 192.198.163.12 as permitted sender) smtp.mailfrom=vishal.l.verma@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1713304023; a=rsa-sha256; cv=none; b=Yy0uGhSdEjvEXXFE8c0+ZqemcvcHzPtP6DCqsVJXIDeOM564ChhGK8xcr9KSw6laoCRUZu evFWm4YflYbK5AdnGu342DSaFpGNE1zje69Lgronk4FOvmAwVMWQ1J6UQp65+uYGRYEmEQ ws3xcL+y31m+slqYLE3Lb4OjG1zc4xk= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713304024; x=1744840024; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=AYcLtBXwGHJ1lHYc9yCNHOV9e648ufAKYQk7scG7Fsg=; b=DkB6687odJD0KWMtnO9Iv633nAqEzR/Gkl2aK9t+/KYDjIcmXn3DQ5W2 FwSd44h3KNIRVAKRyZhTvz9fxoJiNWLFZwJFgnskcKcnFRw5KxDVChqt2 jbpm2lDkjXIWaqqZ6XK214opAdI7m1D5xJYVWg8ySkeey01prRuPaG//F WPVx1oLdu5vAE2GKrYsg7HHyY7UE7Oa0a9bxhN42JT3GiomiJYJ5gEKLS 3fmkeE6QEAF0Pn67ljDdorlpVXw/md1Nlo+YwQYKUJ86i426WL+NUhbg6 Mc7V8kB3CU8wi2NK2B6PBSbOVUCS1ZmxzfH3IiRVw/ewkUH5oKddDgx1L Q==; X-CSE-ConnectionGUID: lbUjSsMUS7GFklrR2UBaFw== X-CSE-MsgGUID: DZZ1dCnMR6qgJaxkyZ9Pog== X-IronPort-AV: E=McAfee;i="6600,9927,11046"; a="12553102" X-IronPort-AV: E=Sophos;i="6.07,207,1708416000"; d="scan'208";a="12553102" 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 MIME-Version: 1.0 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 X-Stat-Signature: nck1it4wz3mj7rwjpeoohf4iei4qi8mc X-Rspamd-Queue-Id: AB49C140005 X-Rspamd-Server: rspam10 X-Rspam-User: X-HE-Tag: 1713304023-253495 X-HE-Meta: U2FsdGVkX1/8OkcEQptFLZxjgx34hE4nFgmRd2fHVIe2dfZ7TnNxtFfWMpWa9pMBH3wE3myn3mvikVsGfy3hONkbc+6TYh89CjWAJPOkmZkTxDDWWvZ4j2bJYoI8KQYaWg+IRnXM4NG+qU+O4wngsx3qKeO26b23o7n3qOJ0kpySx6srAtkNpmSe/NbIvVFdvcmJwRpYPxmslmY+bPZ0juwyoCxUV/zc0Y4IEJmPmSCK3ZD452L7w2bsxiI8Pv/YqpORYr41Jphg3+z57fSom2DAyqrQpiijQAg8b03P/JVdOmyOJ59ZQQEdhMq+ghcRbqFPzdNk+ziFSB9o2Flj+2I9/4D/Y18NE66b/7ye1UCxppmwdpEHTEYq0UZYuTvmc2xTcIymV5/UwNleaSG2Soz4YPPCcaNrNhcVcJRIDpcYeWS3NfQvm4qjn/aTymoaBVXwSD/7Prpx+suOALRXilafBvDulOi2DPx/r6FkKVbdvMVvYS214TUqkrOODa2RUDGGts7M2Fqhyg5YESwh/wmMJjXKWPy7KUPZVFkBprxvdLE8BSbc21KwIW9OEPtPzXDDbAHeP11X/iLw6Qa2ce9IOeKBz7YXLAeuvhEdZeCE7v1P8FlW8fby8xxe16EU7N6NnC9y5WT8vMJz7AzwVlmlz05JabSHLwV5CiYTAhkIWvtivCF5W+Z8omv14jXMWshjim3C30XcDG7e9E3g5o/PnnilUln4WnysRe44Xyp33UINgqJUvdbV71/3evFStkTrsUSEpZ8249EKNQFXiP8XqRrJV8SmEILOnXM2S+IQQuQUYVTmZsPMzzMPl7S8a7ieBeKaUPE5x2JsztX8ML71bT1j8pSmZJY7WWwfnHDEM8eM+skgW6ZFlDaa5OQIW0KcseDRSlnE+H0gZygnizNJck43iRafIdvnZ3SAHQxMU+h1XRIRGi9gWE3oj3YVjNB4rfew2BHYL9LXqxh NY7fzPQo 9xH+5AngCfwRC3Xp54NTydxKncEJ0zl82E7Vgd0Tmsh+zEitx35pRuW/1XVr6wxj6s2JHhjaOYxARSE+E8EdiQY53Y//DPSBGGR0qKp1h7UrvJ7C2fyrEHeLImhYb7+QSYZAQeVjQHTsMyk7Zsxlur58q2TN/7IGIoJYsZZmmK3V3RRIJXf2Wr7+WMbo75O/FFFeJh7Xy5UPrK3yyrAAMjqyygA== 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 Signed-off-by: Vishal Verma Reviewed-by: Dan Williams --- 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);