[PATCH V2 2/3] nvmet-tcp: fix a crash in nvmet_req_complete()

Sagi Grimberg sagi at grimberg.me
Mon Jan 1 01:44:31 PST 2024


>> This is indeed a bug. However nvmet attempts to gracefully fail
>> a particular nvme command when there is a recoverable error (see
>> nvmet_tcp_handle_req_failure).
>>
>> In the case where the length is arbitrarily long, then it really
>> doesn't make sense for nvmet to just accept it and throw it away,
>> but if this is an offset error, maybe it is...
>>
>> I'm not hard set on this, but it would be beneficial to have
>> allow some graceful cmd failure here...
> 
> But doesn't the nvme over fabric specification explicitly say that
> those offset and size errors in H2C PDUs should
> be treated as fatal transport errors (See
> NVMe-over-Fabrics-1.1a-2021.07.12, page 69) ?
> What is really missing here is setting the Fatal Error Status field in
> the C2HTermReq PDU, that's
> why I left the FIXME tag in the comment.

You're correct, the spec does say that. Sometimes I forget...



More information about the Linux-nvme mailing list