[PATCH] nvmet: reject namespace enable without device path
Keith Busch
kbusch at kernel.org
Wed Sep 2 15:31:47 PDT 2026
On Thu, Aug 27, 2026 at 07:52:21AM +0000, Seokgyu Choi wrote:
> A newly allocated namespace has a NULL device_path until userspace
> configures the device_path attribute.
>
> If buffered_io is enabled before device_path is configured,
> nvmet_bdev_ns_enable() returns -ENOTBLK and nvmet_ns_enable() falls
> back to nvmet_file_ns_enable(). The latter passes the NULL
> device_path to filp_open(), causing a NULL pointer dereference in
> getname_kernel().
>
> Reject namespace enable when device_path has not been configured.
Thanks, applied to nvme-7.3.
More information about the Linux-nvme
mailing list