[PATCH] nvmet: better data length validation
Christoph Hellwig
hch at lst.de
Thu Nov 9 08:43:28 PST 2017
On Thu, Nov 09, 2017 at 06:41:24PM +0200, Sagi Grimberg wrote:
>
>> 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.
>
> That will also be useful when we will have DIF support ;)
.. and for the passthrough driver as well.
More information about the Linux-nvme
mailing list