[PATCH v6 0/4] nvmet: avoid recursive configfs open
Runyu Xiao
runyu.xiao at seu.edu.cn
Sat Sep 26 02:21:44 PDT 2026
Several configfs store callbacks open user-configured paths while holding
the item's frag_sem. If a configured path resolves into configfs, the open
can re-enter __configfs_open_file() and try to acquire the same
non-recursive semaphore again.
Add helpers in configfs for opening non-configfs paths, then use them in the
nvmet file-backed namespace and passthru paths. The series also pins the
target-core db_root path and uses the root-relative helper for ALUA and APTPL
metadata, so the helper has its target-core consumer in the same series.
Changes since v5:
- Add the target-core db_root patch as 4/4 and use configfs_open_root() for
validation and metadata opens.
- Replace the verbose helper kerneldoc with concise interface descriptions.
- Keep the Reviewed-by tags on the unchanged nvmet patches.
Runyu Xiao (4):
fs: configfs: add helpers for opening non-configfs paths
nvmet: avoid recursive configfs open for file-backed namespaces
nvmet: avoid recursive configfs open for passthru
scsi: target: pin db_root for metadata writes
drivers/nvme/target/io-cmd-file.c | 3 +-
drivers/nvme/target/passthru.c | 3 +-
drivers/target/target_core_alua.c | 42 +++++-----
drivers/target/target_core_configfs.c | 116 ++++++++++++++++++++------
drivers/target/target_core_internal.h | 3 +
drivers/target/target_core_pr.c | 21 +++--
fs/configfs/mount.c | 53 ++++++++++++
include/linux/configfs.h | 5 ++
8 files changed, 189 insertions(+), 57 deletions(-)
base-commit: df2908090cda368b01ff43709f51890076c56157
--
2.34.1
More information about the Linux-nvme
mailing list