]> git.baikalelectronics.ru Git - kernel.git/commit
nvmet-tcp: fix a segmentation fault during io parsing error
authorElad Grupi <elad.grupi@dell.com>
Wed, 31 Mar 2021 09:13:14 +0000 (17:13 +0800)
committerChristoph Hellwig <hch@lst.de>
Thu, 15 Apr 2021 06:12:50 +0000 (08:12 +0200)
commit93ea78407da80befa3f0004deb71b9ee98dedde5
tree0ec1e9a2a42c85dac6177d6b724028629421a524
parente22fc55462168e12ff61d41bb99a84637806dff9
nvmet-tcp: fix a segmentation fault during io parsing error

In case there is an io that contains inline data and it goes to
parsing error flow, command response will free command and iov
before clearing the data on the socket buffer.
This will delay the command response until receive flow is completed.

Fixes: 82a5e0cb5a13 ("nvmet-tcp: add NVMe over TCP target driver")
Signed-off-by: Elad Grupi <elad.grupi@dell.com>
Signed-off-by: Hou Pu <houpu.main@gmail.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/tcp.c