nvme: fix lightnvm check
nvme_nvm_ns_supported assumes every device is a pci_dev, which leads to reading an incorrect field, or possible even a dereference of unallocated memory for fabrics controllers. Fix this by introducing a quirk for lighnvm capable devices instead. Signed-off-by:Christoph Hellwig <hch@lst.de> Reviewed-by:
Matias Bjørling <mb@lightnvm.io> Reviewed-by:
Keith Busch <keith.busch@intel.com> Reviewed-by:
Sagi Grimberg <sagi@grimberg.me>
Showing
- drivers/nvme/host/core.c 5 additions, 4 deletionsdrivers/nvme/host/core.c
- drivers/nvme/host/lightnvm.c 0 additions, 26 deletionsdrivers/nvme/host/lightnvm.c
- drivers/nvme/host/nvme.h 5 additions, 5 deletionsdrivers/nvme/host/nvme.h
- drivers/nvme/host/pci.c 4 additions, 0 deletionsdrivers/nvme/host/pci.c
Loading
Please register or sign in to comment