linux-brain/drivers/nvme
Minwoo Im 95a7d23415 nvme-pci: fix NULL pointer dereference in nvme_free_host_mem()
[ Upstream commit 7e5dd57ef3 ]

Following condition which will cause NULL pointer dereference will
occur in nvme_free_host_mem() when it tries to remove pci device via
nvme_remove() especially after a failure of host memory allocation for HMB.

    "(host_mem_descs == NULL) && (nr_host_mem_descs != 0)"

It's because __nr_host_mem_descs__ is not cleared to 0 unlike
__host_mem_descs__ is so.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-03 17:39:10 +01:00
..
host nvme-pci: fix NULL pointer dereference in nvme_free_host_mem() 2018-02-03 17:39:10 +01:00
target nvmet-fc: correct ref counting error when deferred rcv used 2018-02-03 17:38:59 +01:00
Kconfig nvmet: add a generic NVMe target 2016-07-05 11:30:33 -06:00
Makefile nvmet: add a generic NVMe target 2016-07-05 11:30:33 -06:00