Re: [PATCH] nvmet: reject namespace enable without device path

From: Keith Busch

Date: Wed Sep 02 2026 - 18:43:16 EST


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.