]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-tcp: fix nvme_tcp_term_pdu to match spec
authorCaleb Sander <csander@purestorage.com>
Mon, 20 Mar 2023 15:57:36 +0000 (09:57 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Apr 2023 09:16:38 +0000 (11:16 +0200)
commit2b65b1b0c11f903ce22eb525b2d66c2939918634
treec27a7012496c5e6d1e32f9e0ffe2866e9cafdb4e
parent042b07917629c696f52c58b5ccd1fc04e8ede0d2
nvme-tcp: fix nvme_tcp_term_pdu to match spec

[ Upstream commit aa01c67de5926fdb276793180564f172c55fb0d7 ]

The FEI field of C2HTermReq/H2CTermReq is 4 bytes but not 4-byte-aligned
in the NVMe/TCP specification (it is located at offset 10 in the PDU).
Split it into two 16-bit integers in struct nvme_tcp_term_pdu
so no padding is inserted. There should also be 10 reserved bytes after.
There are currently no users of this type.

Fixes: c44e93b83bad0196 ("nvme-tcp: Add protocol header")
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Caleb Sander <csander@purestorage.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/nvme-tcp.h