diff options
author | Christoph Hellwig <hch@lst.de> | 2017-11-09 14:29:58 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-11-11 03:53:25 +0100 |
commit | 5e62d5c993e6889cd314d5b5de6b670152109a0e (patch) | |
tree | 381ea84b468c5c5b73aaa796d6ee8549599edf55 /init/main.c | |
parent | nvme-pci: avoid dereference of symbol from unloaded module (diff) | |
download | linux-5e62d5c993e6889cd314d5b5de6b670152109a0e.tar.xz linux-5e62d5c993e6889cd314d5b5de6b670152109a0e.zip |
nvmet: better data length validation
Currently the NVMe target stores the expexted data length in req->data_len
and uses that for data transfer decisions, but that does not take the
actual transfer length in the SGLs into account. So this adds a new
transfer_len field, into which the transport drivers store the actual
transfer length. We then check the two match before actually executing
the command.
The FC transport driver already had such a field, which is removed in
favour of the common one.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'init/main.c')
0 files changed, 0 insertions, 0 deletions