[PATCH] nvmet: validate device_path before enabling namespace

Keith Busch kbusch at kernel.org
Tue Sep 8 12:57:17 PDT 2026


On Wed, Sep 09, 2026 at 01:04:52AM +0530, pavankumaryalagada at gmail.com wrote:
> From: Yalagada Pavan Kumar <pavankumaryalagada at gmail.com>
> 
> When buffered_io is enabled, nvmet_bdev_ns_enable() returns -ENOTBLK
> without checking whether device_path is configured. nvmet_ns_enable()
> then falls back to nvmet_file_ns_enable(), which passes the NULL
> device_path to filp_open() and causes a NULL pointer dereference.
> 
> Validate device_path before attempting to enable to namespace and
> return -EINVAL when it has not been configured.

This was alraedy closed:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=09d0c07bd9ce3b2f2d993f672698d32a17543c32



More information about the Linux-nvme mailing list