]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-tcp: fix a NULL deref when receiving a 0-length r2t PDU
authorSagi Grimberg <sagi@grimberg.me>
Mon, 15 Mar 2021 21:08:11 +0000 (14:08 -0700)
committerChristoph Hellwig <hch@lst.de>
Thu, 18 Mar 2021 04:39:01 +0000 (05:39 +0100)
commite3dc751dd9cd63a2d592180d64421e9ef2a29984
treef1449dc8e8b3931ecc45327c6942d7f1c683e2d9
parent166f5e2b3e126917334bd325d2d5398dc9b33780
nvme-tcp: fix a NULL deref when receiving a 0-length r2t PDU

When the controller sends us a 0-length r2t PDU we should not attempt to
try to set up a h2cdata PDU but rather conclude that this is a buggy
controller (forward progress is not possible) and simply fail it
immediately.

Fixes: 1fcf4b8ae898 ("nvme-tcp: add NVMe over TCP host driver")
Reported-by: Belanger, Martin <Martin.Belanger@dell.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/tcp.c