nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] dax/bus.c: Fixups for dax-bus locking
@ 2024-04-16 21:46 Vishal Verma
  2024-04-16 21:46 ` [PATCH v2 1/4] dax/bus.c: replace WARN_ON_ONCE() with lockdep asserts Vishal Verma
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Vishal Verma @ 2024-04-16 21:46 UTC (permalink / raw)
  To: Dan Williams, Dave Jiang, Alison Schofield, Andrew Morton
  Cc: linux-mm, nvdimm, linux-cxl, linux-kernel, Vishal Verma

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,
-- 
Vishal Verma <vishal.l.verma@intel.com>


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-04-30  5:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-16 21:46 [PATCH v2 0/4] dax/bus.c: Fixups for dax-bus locking Vishal Verma
2024-04-16 21:46 ` [PATCH v2 1/4] dax/bus.c: replace WARN_ON_ONCE() with lockdep asserts Vishal Verma
2024-04-30  1:23   ` Dan Williams
2024-04-16 21:46 ` [PATCH v2 2/4] dax/bus.c: fix locking for unregister_dax_dev / unregister_dax_mapping paths Vishal Verma
2024-04-30  1:25   ` Dan Williams
2024-04-30  4:11     ` Verma, Vishal L
2024-04-30  5:25       ` Dan Williams
2024-04-16 21:46 ` [PATCH v2 3/4] dax/bus.c: Don't use down_write_killable for non-user processes Vishal Verma
2024-04-30  1:25   ` Dan Williams
2024-04-16 21:46 ` [PATCH v2 4/4] dax/bus.c: Use the right locking mode (read vs write) in size_show Vishal Verma
2024-04-30  1:26   ` Dan Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).