Home
last modified time | relevance | path

Searched hist:ca1ff67d (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/nvme/host/
H A Dtcp.cca1ff67d Wed Jan 13 15:56:57 CST 2021 Sagi Grimberg <sagi@grimberg.me> nvme-tcp: fix possible data corruption with bio merges

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 <pkuwangh@gmail.com>
Fixes: 3f2304f8c6d6 ("nvme-tcp: add NVMe over TCP host driver")
Tested-by: Hao Wang <pkuwangh@gmail.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>