nvme-pci: check segement valid for SGL use
authorKeith Busch <keith.busch@intel.com>
Wed, 17 Jan 2018 21:04:37 +0000 (22:04 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 17 Jan 2018 21:05:33 +0000 (14:05 -0700)
commit20469a37aed12a886d0deda5a07c04037923144a
tree4814f6a59399241d301081c4398d623ea42271fb
parent32835a074171e7b83c1cefbbf9d681bb9518bbd5
nvme-pci: check segement valid for SGL use

The driver needs to verify there is a payload with a command before
seeing if it should use SGLs to map it.

Fixes: 955b1b5a00ba ("nvme-pci: move use_sgl initialization to nvme_init_iod()")
Reported-by: Paul Menzel <pmenzel+linux-nvme@molgen.mpg.de>
Reviewed-by: Paul Menzel <pmenzel+linux-nvme@molgen.mpg.de>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/pci.c