android_kernel_motorola_sm6375/drivers/nvme
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Sagi Grimberg c70f6e0ac9 nvme-tcp: fix possible data corruption with bio merges
commit ca1ff67d0fb14f39cf0cc5102b1fbcc3b14f6fb9 upstream.

When a bio merges, we can get a request that spans multiple
bios, and the overall request payload size is the sum of
all bios. When we calculate how much we need to send
from the existing bio (and bvec), we did not take into
account the iov_iter byte count cap.

Since multipage bvecs support, bvecs can split in the middle
which means that when we account for the last bvec send we
should also take the iov_iter byte count cap as it might be
lower than the last bvec size.

Reported-by: Hao Wang <[email protected]>
Fixes: 3f2304f8c6 ("nvme-tcp: add NVMe over TCP host driver")
Tested-by: Hao Wang <[email protected]>
Signed-off-by: Sagi Grimberg <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-19 18:26:17 +01:00
..
host nvme-tcp: fix possible data corruption with bio merges 2021-01-19 18:26:17 +01:00
target nvmet-rdma: Fix list_del corruption on queue establishment failure 2021-01-19 18:26:15 +01:00
Kconfig
Makefile