Message ID | 20240416-vv-dax_abi_fixes-v2-0-d5f0c8ec162e@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 0410FC4345F for <linux-mm@archiver.kernel.org>; Tue, 16 Apr 2024 21:47:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6CCF16B0088; Tue, 16 Apr 2024 17:47:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 67C656B0089; Tue, 16 Apr 2024 17:47:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 543C66B008A; Tue, 16 Apr 2024 17:47:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 361A96B0088 for <linux-mm@kvack.org>; Tue, 16 Apr 2024 17:47:00 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id EDC28120C2A for <linux-mm@kvack.org>; Tue, 16 Apr 2024 21:46:59 +0000 (UTC) X-FDA: 82016730558.28.527396A Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by imf05.hostedemail.com (Postfix) with ESMTP id C103F100011 for <linux-mm@kvack.org>; Tue, 16 Apr 2024 21:46:57 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=iyx8qwIK; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf05.hostedemail.com: domain of vishal.l.verma@intel.com designates 192.198.163.12 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=1713304018; 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=OrvPBk6DS3eT4KaNx9VGuYO3+m71AAYh1KH/DXxyAMc=; b=FyutUCY8QFxhXsSHkwItoeqgb5jYPKOIeHJyGRBC2fZfq5jPR9iW0K1MbdWcsXq7E1EzCe XDw/w0RjOKYTyD3Y8q3ZcZ7JM6r3HCQsSFENms5oN/hr6s1ij0Ad6yjPqq6v89S7LmVGKJ yyCfccrcTmKq3mnlATcabSAJMSAf278= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=iyx8qwIK; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf05.hostedemail.com: domain of vishal.l.verma@intel.com designates 192.198.163.12 as permitted sender) smtp.mailfrom=vishal.l.verma@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1713304018; a=rsa-sha256; cv=none; b=2hHO4L4gVdBKVAIAEXV3dqse4uuQmDh1w5UVNa19WUUDgg/IqUuv9uUEDjMaQUuAx/IHuR FMEy4igo6D//R2DjVTtVGF/H/0aB6wSrJ7maNqk/DyHuPrSVie+/KcWPUQWoJinDgciC3h k/m8+CLVgeTgYRQtuaUxOJ9HXnQ4EKU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713304018; x=1744840018; h=from:subject:date:message-id:mime-version: content-transfer-encoding:to:cc; bh=O3/Jn76Fpegg6CH3Hagf24WgpAT3a74CNE0jvqQVUBk=; b=iyx8qwIKR7qOgQqOJ/L2I4rckcR01uPe/k1031bAUbTtkynqC8K7Y52X 3BZUzTvBLCUoo2MCKvay8x4j3IT4d/noYIx7Lv5LssIV5mEtu8TY3Ee4H 1Ymr+R72KnzSj61smuUrOrDxP6BmYI+N1XxUYj/62es9FljKNVNXSsLLm WXHaYbgLWoayc/B4GQSa5Pul4K97grACBpOcp0xRmIKfVHsOoEvQswzea 3r9BJ/7KcGA5MOw7xsZEildI0W+ZjkMmVk/5sh4IVRmDHgbbOHMnoBGUi G9yaV+iGuW5Y4xcdEZGpp61Ncvu3vYU57EWIuulGhEgFJfaF5JuYoJnQX g==; X-CSE-ConnectionGUID: Ez4s/h2aQ6KmBd5LuKsgNw== X-CSE-MsgGUID: ytWxq78tQYCSRaYb3e73bQ== X-IronPort-AV: E=McAfee;i="6600,9927,11046"; a="12553085" X-IronPort-AV: E=Sophos;i="6.07,207,1708416000"; d="scan'208";a="12553085" 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:41 -0700 X-CSE-ConnectionGUID: RBxp1uv0RlqAltlIgAc78A== X-CSE-MsgGUID: FV1TOrCBTUya1nUrwBjR+A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,207,1708416000"; d="scan'208";a="22464232" 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:40 -0700 From: Vishal Verma <vishal.l.verma@intel.com> Subject: [PATCH v2 0/4] dax/bus.c: Fixups for dax-bus locking Date: Tue, 16 Apr 2024 15:46:15 -0600 Message-Id: <20240416-vv-dax_abi_fixes-v2-0-d5f0c8ec162e@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAKfxHmYC/32NUQrCMBBEr1L220iatiJ+eQ8pZZNs7IImJSmhU nJ3Yw/g55vhzeyQKDIluDU7RMqcOPgK6tSAmdE/SbCtDEqqXvZSiZyFxW1CzZPjjZK4ouv0xTl FA0LVlkhHUa3HWHnmtIb4OR5y+0v/jOVWtMJ0JJ3V6DQOd/Yrvc4mvGEspXwBPsvkDrAAAAA= 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=1472; i=vishal.l.verma@intel.com; h=from:subject:message-id; bh=O3/Jn76Fpegg6CH3Hagf24WgpAT3a74CNE0jvqQVUBk=; b=owGbwMvMwCXGf25diOft7jLG02pJDGlyHzdtm/Lm7msBm8qMZQst+BptjdJfiNaZpWrGfNZY9 +n621nZHaUsDGJcDLJiiix/93xkPCa3PZ8nMMERZg4rE8gQBi5OAZhIXwzD/8Cac5f4XgRu6jlg /mzd4YXX7wntMf6eeGR+WcFpKy7Jj4sY/mnrRVyyvNBw5+OubvHCta8M0treJk5M+eq0MfZT0OW YjxwA X-Developer-Key: i=vishal.l.verma@intel.com; a=openpgp; fpr=F8682BE134C67A12332A2ED07AFA61BEA3B84DFF X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: C103F100011 X-Rspam-User: X-Stat-Signature: j684f5ahoetcmar5m7r355ug8ocizrht X-HE-Tag: 1713304017-58508 X-HE-Meta: U2FsdGVkX1+4QfqP0x9PeRfeECRaEqM1+bx8U4kXzGSBk+u23Hii2R6MAvqqSefI9ijJ7Kr7kVQQAoR7+4BgK+erd2WZZ/tg0W0NVS5pfKNWlwFhSlgCpZrsOZ9JPg79nZYHAmQBMUs29qeWA5NoKUHKP5k1WaiGJmkMkiLz7Bp7MeV+e18XrIE0XhKHSQCS5D9tl1ltRd+UAh2iqseLG/d3U78H7YwlZGXXmBIMLYXGvGEmj3hKzSN0F3tFDmIRH5aZGpN2gy5thCY/dL3lXtLGeKG5xOfGVWsgJLqLdTEuUEV+c6aYa4x4x7sXDK8CWpuDr8hIq84ax0JhHYM0DdPqpf9YFloh0s2PvLgr0Ji7hLR6l7OIbO2cejBjrTPv3DhH9T1kDAm/Ir+nVHvHyME4W5cbvC3towl7fIyDmvE3zgXh5KS9H/CqWEZBSNJHe5tAmR5P/G5LyBIYb5IHq9Ca0y/OySSGw8gw+OOO/FTirBjXNsrF/MLDpNnv9xJwFkJf2iqIp6BDyr6I2K6hax1QxPxTDmazHVYA7KssZ5/2CAZhx8jHmYwBbeoSACs9kzFggqrNHRd5cDVSm1lE0x2+t+QScL56YAVHXsReGbA/bKgeYnd44m6OUr+NoCi2UO7vtyCGe8vanPQ/f5MuWAozoYgDx0/gUfP3GjYlE5bG+sxtXnIeVg2ZguZlRSizFsWRtVbFnnP6MN5rgQ3m3kvTQl2uii2UTior8ySVTo/gaHo4fJDoKbtU3dvQZlScWpzHmnftxdy/Jol3tJJYtHtG3bBIWfc3VOE2P/SCovveIRCpHX97mcEGYlp77oUdvbDy7ClaOVQoXLBYDA1RiA== 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 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 | 68 ++++++++++++++++--------------------------------------- 1 file changed, 20 insertions(+), 48 deletions(-) --- base-commit: 39cd87c4eb2b893354f3b850f916353f2658ae6f change-id: 20240402-vv-dax_abi_fixes-8af3b6ff2e5a Best regards,