Re: [PATCH v6 3/4] nvmet: avoid recursive configfs open for passthru

From: Logan Gunthorpe

Date: Mon Sep 28 2026 - 11:57:50 EST




On 2026-09-26 03:21, Runyu Xiao wrote:
> nvmet_passthru_enable_store() runs as a configfs store callback while
> configfs holds the item frag_sem. Passthru enable used filp_open() on the
> configured controller path, so a path into configfs could re-enter
> __configfs_open_file() and try to acquire the same semaphore again.
>
> Use configfs_file_open() so the path is resolved before opening,
> configfs-backed paths are rejected, and the resolved path is opened with
> file_open_root() while retaining the normal open-time permission and
> security checks.
>
> Fixes: cae5b01a2afc ("nvmet: introduce the passthru configfs interface")
> Cc: stable@xxxxxxxxxxxxxxx
> Reviewed-by: Christoph Hellwig <hch@xxxxxx>
> Assisted-by: LLM Codex
> Signed-off-by: Runyu Xiao <runyu.xiao@xxxxxxxxxx>

The problem and solution make sense to me, thanks.

Reviewed-by: Logan Gunthorpe <logang@xxxxxxxxxxxxx>