]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 08:49:58 +0000 (10:49 +0200)
commitdf25363666051660cea090eade7d2857342384b4
tree951c90ee47badcb6a17318346c3638fc64c6ecfd
parent817f96200cb8b7874d4032a62a4bd3b6e043eee7
nvmet-tcp: fix a segmentation fault during io parsing error

[ Upstream commit bdaf13279192c60b2b1fc99badef53b494fec055 ]

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: 872d26a391da ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/target/tcp.c