[PATCH 2/2] nvmet: reject enabling a namespace without a device path

Christoph Hellwig hch at lst.de
Wed Sep 9 22:42:35 PDT 2026


On Tue, Sep 08, 2026 at 11:35:19AM +0800, Julian Sun wrote:
> With buffered I/O enabled, nvmet_bdev_ns_enable() returns -ENOTBLK
> before validating the device path. Enabling a namespace without setting
> device_path therefore passes NULL to filp_open() and crashes in
> getname_kernel().
> 
> Reject enabling a namespace if no device path has been configured.

Looks good:

Reviewed-by: Christoph Hellwig <hch at lst.de>

Can you add test for this to blktests?




More information about the Linux-nvme mailing list