diff options
author | Ming Lei <ming.lei@redhat.com> | 2019-03-27 17:07:22 +0800 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2019-03-28 18:15:02 +0100 |
commit | 02db99548d3608a625cf481cff2bb7b626829b3f (patch) | |
tree | 9ca7acd23830eb71cd449c9a58d1d88d02d6fb86 /include/acpi | |
parent | cc2278c413c3a06a93c23ee8722e4dd3d621de12 (diff) |
nvmet: fix building bvec from sg list
There are two mistakes for building bvec from sg list for file
backed ns:
- use request data length to compute number of io vector, this way
doesn't consider sg->offset, and the result may be smaller than required
io vectors
- bvec->bv_len isn't capped by sg->length
This patch fixes this issue by building bvec from sg directly, given
the whole IO stack is ready for multi-page bvec.
Reported-by: Yi Zhang <yi.zhang@redhat.com>
Fixes: 3a85a5de29ea ("nvme-loop: add a NVMe loopback host driver")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'include/acpi')
0 files changed, 0 insertions, 0 deletions