]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/nvme/host/pci.c
nvme-pci: fix host memory buffer allocation fallback
authorChristoph Hellwig <hch@lst.de>
Mon, 11 Sep 2017 16:08:43 +0000 (12:08 -0400)
committerChristoph Hellwig <hch@lst.de>
Mon, 11 Sep 2017 16:29:37 +0000 (12:29 -0400)
commit92dc689563170b90ba844b8a2eb95e8a5eda2e83
tree210fe88f087cd10c506106202afc3779cf685d8b
parent608cc4b14aeadcf3e4dc325fc211b7052e74b50c
nvme-pci: fix host memory buffer allocation fallback

nvme_alloc_host_mem currently contains two loops that are interwinded,
and the outer retry loop turns out to be broken.  Fix this by untangling
the two.

Based on a report an initial patch from Akinobu Mita.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Akinobu Mita <akinobu.mita@gmail.com>
Tested-by: Akinobu Mita <akinobu.mita@gmail.com>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Cc: stable@vger.kernel.org
drivers/nvme/host/pci.c