Message ID | 20240430-vv-dax_abi_fixes-v3-0-e3dcd755774c@intel.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 91AD5C19F4F for <linux-mm@archiver.kernel.org>; Tue, 30 Apr 2024 17:44:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 247D96B00BC; Tue, 30 Apr 2024 13:44:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1F78B6B00BD; Tue, 30 Apr 2024 13:44:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 098926B00BE; Tue, 30 Apr 2024 13:44:46 -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 E0AEB6B00BC for <linux-mm@kvack.org>; Tue, 30 Apr 2024 13:44:45 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id A8A27401B8 for <linux-mm@kvack.org>; Tue, 30 Apr 2024 17:44:45 +0000 (UTC) X-FDA: 82066923330.12.8C447AE Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by imf04.hostedemail.com (Postfix) with ESMTP id 6C8B74000C for <linux-mm@kvack.org>; Tue, 30 Apr 2024 17:44:42 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=DtbVz7CF; spf=pass (imf04.hostedemail.com: domain of vishal.l.verma@intel.com designates 198.175.65.10 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=1714499083; 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: references:dkim-signature; bh=7Qi+9Lj//2gN5mxI1dgvSV2MpYjsPTXxcZS5Otw2dBs=; b=Xtwozz1yDDzHYp1JgPIFRwzDJqcbG3bxiE6/UOzv/P230sa3m0H2o1dO5wNqgrXdr/0Pyv b3e684bwHhAuHty7yXDBV9oNPf55cvHRgu1Ikc+Nmam+U7tQgkagPTN+ljKweMjLHU68Jo ySor8aKMNo62uEZbvw556kKYNbUnnXU= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=DtbVz7CF; spf=pass (imf04.hostedemail.com: domain of vishal.l.verma@intel.com designates 198.175.65.10 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=1714499083; a=rsa-sha256; cv=none; b=ZWQjYWRfaRImBlc66Ts3iC5PNHUrVlWw1alIIGeiNxEz4qDkTri7eqSyX6FHNViIfm+DpJ THc9WP4uIOeDW01nRtxS3Vkxl50PI9v9U498Q5W5PiYfFClDg1OtsFoyryTQqgG2s/mntp C1Wnw9sLvXLa+JOstpBjwfQmNzYKdlc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714499082; x=1746035082; h=from:subject:date:message-id:mime-version: content-transfer-encoding:to:cc; bh=nHPBa1hKRfZ9dLWYPef6NXJGJU2ladqY7W9AbvHufiI=; b=DtbVz7CFSveoiXN+wLSZBt0j4X6wBNy4qotqkwEV6zc/Jn2sKQMIG4Xy fnfnmX9w2GbMRtwyWAMhu3oaZZQUvH6A+o6lFIX930NoszJYakSNOAMi5 sWeB8gMdhP1woYfQrxP4A7VBRcERIVGhzmT4HGe2dKyttjwEYXf7Pk53C 7YbGlYYsKs9Yv5ihxliUG71L325Kgo9XLTFPpyImUzyPBqAs5eDcfkXOc j93ZGB3L9knU+OgRyIYc3odX5q/RHf7Zd3VHuChHmpu1EPE7EsmIvxseg 4Qxlc1Y4TuRA5zTsDH1NmwwseR51bi7woaFfViOH6fF+0AADRV+nniXUW Q==; X-CSE-ConnectionGUID: clrXtMSsSn6rDmKWqLImaQ== X-CSE-MsgGUID: E8Gj1J8dSxyOgxPwfGXMvQ== X-IronPort-AV: E=McAfee;i="6600,9927,11060"; a="27669829" X-IronPort-AV: E=Sophos;i="6.07,242,1708416000"; d="scan'208";a="27669829" 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:41 -0700 X-CSE-ConnectionGUID: deO5bSNgTo+ezujjPEwEoQ== X-CSE-MsgGUID: PNLzAvs+Qaai0A1NouEAMQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,242,1708416000"; d="scan'208";a="26534771" 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:41 -0700 From: Vishal Verma <vishal.l.verma@intel.com> Subject: [PATCH v3 0/4] dax/bus.c: Fixups for dax-bus locking Date: Tue, 30 Apr 2024 11:44:22 -0600 Message-Id: <20240430-vv-dax_abi_fixes-v3-0-e3dcd755774c@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAPYtMWYC/32NywqDMBBFf0Wy7pRkfCBd9T9KkTwmdaDVkkiwi P/e6MpF6fLcyz13EZECUxSXYhGBEkcehwzlqRC218ODgF1mgRIrWUmElMDpudOGO88zRWi1L03 jPVKtRZ69A+1FXt3umXuO0xg++0NSW/pHlhQosCVJ74z2RtdXHiZ6nu34Epss4UGgmh8CBAmu9 tK2ZFWDdBSs6/oFMTrq5PEAAAA= To: Dan Williams <dan.j.williams@intel.com>, Dave Jiang <dave.jiang@intel.com>, Alison Schofield <alison.schofield@intel.com>, Andrew Morton <akpm@linux-foundation.org> Cc: linux-mm@kvack.org, nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org, Vishal Verma <vishal.l.verma@intel.com> X-Mailer: b4 0.14-dev-5ce50 X-Developer-Signature: v=1; a=openpgp-sha256; l=1729; i=vishal.l.verma@intel.com; h=from:subject:message-id; bh=nHPBa1hKRfZ9dLWYPef6NXJGJU2ladqY7W9AbvHufiI=; b=owGbwMvMwCXGf25diOft7jLG02pJDGmGuv9st9TPPWRY8i5c9u6JlcEX7z5jyRLXjFOptzt44 dWC0rTKjlIWBjEuBlkxRZa/ez4yHpPbns8TmOAIM4eVCWQIAxenAEzE9T0jw0qZM96Tzc9dlFk4 Y0VrxgTvE8cU9+SYL7vbaLX996Y1W6IZ/srdPSG3SGlNcNnKY0fNZzgWN0uU8ShkWrQl/729uK7 qEhcA X-Developer-Key: i=vishal.l.verma@intel.com; a=openpgp; fpr=F8682BE134C67A12332A2ED07AFA61BEA3B84DFF X-Rspamd-Queue-Id: 6C8B74000C X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: nt93b1ujtwmomdc6wzjkm3gbeqzgz4og X-HE-Tag: 1714499082-862478 X-HE-Meta: U2FsdGVkX18wr2w07Hl0CXQoKEqaQDtWs2I8XT3uo25hdtflHpqaj6nyuCw7anV/ugnzeX7wcsbzjL0xhArwYh387Ezf8U0hkwK9WXys+xpvS8I7HEjGH5tVWiPq27lBoUNPpBH1qJ7Ygybw4R5eJgO+6dzBPzlSvgZXdSmFgN/X6qhjjEvz9HKXUQzxvuKjnKJsyeCOuhRdejQ7LPZVIQIt+MJJWtaCOR8oX2zuJy9R1YiPk5dyO7xkhdB9xKnDcH9NkNqly87oaLWM/5yDcv9+M/DNfJRZAQnqtYWvRJR3Z4aql6WyM9fdIyg6i61O/q98ILlQxeXE/b1YCxOsOK1vzW0rDD8oZ3YGUtLOzUyW5QfG1PHjuqt/0n1HTOoviE2iiBlU/1U2tADVAkokNMlbrg+2pneH1CEac+mwwUou18ksymoCbN4s7jj5dl4jWROz2P/5ZSN2Q4ir67cmSz1TI8O7HgrMuxOSzDCQDr+P2KPEnQuyCpqrgsBtxXpsRI+qAfHgA4Ng/PFfU4DSkgjxy1YM9vkxZ+R0HTi/ECx0o019d1mDmRDnwfkVg1hlUzbng+j4jQDeoPNCGk+O0ASpIOdt7nIDsJTbaLzuwwER65BpfKS0D2sATPyH6popti5IEVOiLB7XWDre42cMTSp6Xnoh1gFLsaDJAQdh6eitfhVsblRFio+ZtPkBtFW9JdTKIWPt1ZFvUNmQZZZsLt6FPPkCkbleRcFh1vaEDrV/3zNWDoP+JX79niv0H9mTYI3R4zsmwpLwLR2NKmzoDlnWmOxXavpb0DK+OoOe0lZ/GrQP/v2PXoxos+6tynD7EWynggdB9Fwat1LyvtNv3fpEEhhZYwhLZemBQfir9nsp1r8DBjY4M35QwfOoi2ejWVAjI7+5p5Y3tFwTvs+R3j3cOpov1kWxe4AkijFCYioJtcj79KjK7sceaO4WB+eZYTNc0Z8kinElHSPwNVt FTGWoTXq 5Ba0Y0l6UJOpxdvV0hc00xYSpPwowJYoAcMO6lMnIfY/XCxB63ryD51fEzTcL6KXSKxXCxS8xdJeOahszZCnBIil3wH+CAPhvkuGILe3GzpKaNaGCjWtZsy02bsO55Q0MuFskshYcHhkZqKLKgqVb7x0KHptFDyW43wu8ypUzos+8PbjS5t9YpNdIcXfKOgUTfAOAa23+uwMR83HPiMnAlScyV+Zpcvm/Cx2h 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
dax/bus.c: Fixups for dax-bus locking
|
expand
|
Commit Fixes: c05ae9d85b47 ("dax/bus.c: replace driver-core lock usage by a local rwsem") introduced a few problems that this series aims to fix. Add back device_lock() where it was correctly used (during device manipulation operations), remove conditional locking in unregister_dax_dev() and unregister_dax_mapping(), use non-interruptible versions of rwsem locks when not called from a user process, and fix up a write vs. read usage of an rwsem. Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> --- Changes in v3: - Rebase to v6.9-rc6 - Collect review tags (Dan) - Reword commit message for patch 2 (Dan) - Use plain down_write() in delete_store() (Dan) - Link to v2: https://lore.kernel.org/r/20240416-vv-dax_abi_fixes-v2-0-d5f0c8ec162e@intel.com Changes in v2: - Add back valid device_lock uses (Dan) - Remove conditional locking (Dan) - Use non-interruptible versions of rwsem locks when not called from a user process (Dan) - Fix up a write vs. read usage of an rwsem - Link to v1: https://lore.kernel.org/r/20240402-vv-dax_abi_fixes-v1-1-c3e0fdbafba5@intel.com --- Vishal Verma (4): dax/bus.c: replace WARN_ON_ONCE() with lockdep asserts dax/bus.c: fix locking for unregister_dax_dev / unregister_dax_mapping paths dax/bus.c: Don't use down_write_killable for non-user processes dax/bus.c: Use the right locking mode (read vs write) in size_show drivers/dax/bus.c | 66 +++++++++++++++---------------------------------------- 1 file changed, 18 insertions(+), 48 deletions(-) --- base-commit: e67572cd2204894179d89bd7b984072f19313b03 change-id: 20240402-vv-dax_abi_fixes-8af3b6ff2e5a Best regards,