diff options
| author | Dave Jiang <dave.jiang@intel.com> | 2026-11-17 15:31:16 -0700 |
|---|---|---|
| committer | Alison Schofield <alison.schofield@intel.com> | 2026-11-17 16:01:39 -0800 |
| commit | 5a277aa7eb4d4f1f05534d6c3dcb1a9fa4f6b8f2 (patch) | |
| tree | eceba54c4037f8240b3262b7253166ab82e2ed42 /kernel/debug | |
| parent | aebb7274476403040d582c61478df8f4a7bf9cd3 (diff) | |
nvdimm/namespace: Nest mapping locks under the bus lock
create_namespaces() takes every mapping lock in a region with
mutex_lock_nested() and uses the mapping index as the subclass. Lockdep
supports only 8 subclasses. A region with more mappings, such as a
12-way CXL pmem region, triggers:
DEBUG_LOCKS_WARN_ON(subclass >= MAX_LOCKDEP_SUBCLASSES)
and lockdep turns itself off.
The caller holds the nvdimm bus reconfig_mutex. Take the mapping locks
with mutex_lock_nest_lock() under that lock instead. Lockdep then
tracks any number of mapping locks.
Fixes: ae8219f186d8 ("libnvdimm, label: convert label tracking to a linked list")
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Tested-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Link: https://patch.msgid.link/20261117223116.3478672-1-dave.jiang@intel.com
Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Diffstat (limited to 'kernel/debug')
0 files changed, 0 insertions, 0 deletions
