[PATCH] nvmet: better data length validation

Sagi Grimberg sagi at grimberg.me
Thu Nov 9 08:41:24 PST 2017


> 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 ;)

Reviewed-by: Sagi Grimberg <sagi at grimberg.me>



More information about the Linux-nvme mailing list