[PATCH V3 0/2] nvmet-tcp: fix receive path error handling and state machine
Keith Busch
kbusch at kernel.org
Wed Apr 8 12:05:24 PDT 2026
On Mon, Mar 16, 2026 at 03:39:34PM +0100, Maurizio Lombardi wrote:
> Patch 1 fixes a potential issue where network data could be read into an
> uninitialized iterator. Currently, nvmet_tcp_build_pdu_iovec() returns void,
> meaning callers are unaware if an out-of-bounds PDU length or offset triggers
> an early return. Consequently, callers blindly overwrite the queue state to
> NVMET_TCP_RECV_DATA. This patch modifies the function to return an error code,
> shifting the handling responsibility to the callers to ensure proper socket
> teardown.
>
> Patch 2 cleans up redundant, localized calls to nvmet_tcp_fatal_error() scattered
> across the receive path. It delegates the responsibility of executing the fatal
> error function to the top-level caller by bubbling up the error codes.
Thanks, applied to nvme-7.1.
More information about the Linux-nvme
mailing list