[PATCH v5] nvme/069: add a test for multipath cdev lifetime

Nilay Shroff nilay at linux.ibm.com
Mon Jul 20 08:04:34 PDT 2026


On 7/20/26 8:32 PM, John Garry wrote:
> In [0], a fix was proposed for the NS and NS head (multipath) cdev
> lifetime.
> 
> The issue was that fds for the nvme-generic cdev may exist after we tear
> down the nvme-subsystem. Issuing an ioctl on that cdev may expose a
> use-after-free.
> 
> This test recreates the method described in [0] to expose this issue
> for NS head cdev.
> 
> First a fd is created by opening the nvme-generic cdev. Next we tear down
> the nvme-subsystem. Finally we try to issue an ioctl on the cdev - without
> the kernel fix in [0], this should trigger a KASAN warn.
> 
> [0]https://lore.kernel.org/linux-nvme/20260713104238.3034640-1-john.g.garry@oracle.com/T/#me118851584fbcbb960795d0f04e2262e5a295613
> 
> Reviewed-by: Daniel Wagner<dwagner at suse.de>
> Signed-off-by: John Garry<john.g.garry at oracle.com>

Looks good to me.

Reviewed-by: Nilay Shroff <nilay at linux.ibm.com>




More information about the Linux-nvme mailing list