]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: fix handling of metadata_len for NVME_IOCTL_IO_CMD
authorRoland Dreier <roland@purestorage.com>
Fri, 20 Jul 2018 03:07:59 +0000 (20:07 -0700)
committerChristoph Hellwig <hch@lst.de>
Fri, 20 Jul 2018 14:43:59 +0000 (07:43 -0700)
commit7c26cfe259f6fc368e3642fa4129caa9bfa13954
treeed4b899b3a3c4b3b8d01aff47f28ad4c5c74393f
parent900fd1ede8407a75c735a6c389a7bc1f7322a814
nvme: fix handling of metadata_len for NVME_IOCTL_IO_CMD

The old code in nvme_user_cmd() passed the userspace virtual address
from nvme_passthru_cmd.metadata as the length of the metadata buffer
as well as the address to nvme_submit_user_cmd().

Fixes: 65d82876 ("nvme: Use metadata for passthrough commands")
Signed-off-by: Roland Dreier <roland@purestorage.com>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c