summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorSagi Grimberg <sagi@grimberg.me>2021-10-24 10:43:31 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-02 19:48:20 +0100
commitdb1191a529e45c41bfd7692ccc5157fe90dc4a9c (patch)
tree7235f93230b81677170ac3eaf7594d4fefa1ebee /kernel
parent5043fbd294f5909a080ade0f04b70a4da9e122b7 (diff)
nvme-tcp: fix H2CData PDU send accounting (again)
commit 25e1f67eda4a19c91dc05c84d6d413c53efb447b upstream. We should not access request members after the last send, even to determine if indeed it was the last data payload send. The reason is that a completion could have arrived and trigger a new execution of the request which overridden these members. This was fixed by commit 825619b09ad3 ("nvme-tcp: fix possible use-after-completion"). Commit e371af033c56 broke that assumption again to address cases where multiple r2t pdus are sent per request. To fix it, we need to record the request data_sent and data_len and after the payload network send we reference these counters to determine weather we should advance the request iterator. Fixes: e371af033c56 ("nvme-tcp: fix incorrect h2cdata pdu offset accounting") Reported-by: Keith Busch <kbusch@kernel.org> Cc: stable@vger.kernel.org # 5.10+ Signed-off-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Keith Busch <kbusch@kernel.org> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions