[PATCH V2] nvmet-tcp: Fix the H2C expected PDU len calculation

Keith Busch kbusch at kernel.org
Fri Jan 5 08:19:17 PST 2024


On Fri, Jan 05, 2024 at 09:14:44AM +0100, Maurizio Lombardi wrote:
> The nvmet_tcp_handle_h2c_data_pdu() function should take into
> consideration the possibility that the header digest and/or the data
> digests are enabled when calculating the expected PDU length, before
> comparing it to the value stored in cmd->pdu_len.
> 
> Fixes: efa56305908b ("nvmet-tcp: Fix a kernel panic when host sends an invalid H2C PDU length")
> Signed-off-by: Maurizio Lombardi <mlombard at redhat.com>

Looks good to me.

Reviewed-by: Keith Busch <kbusch at kernel.org>



More information about the Linux-nvme mailing list