summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorSagi Grimberg <sagi@grimberg.me>2021-09-14 18:38:55 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-30 10:11:04 +0200
commit419fab1cb0861c0220e31aa09ca6f9297704a492 (patch)
tree21a6e3743bd892ecfb4f67ed78d302e0131ef9bd /drivers/spi
parentc6ecdcba9da3416030cfc9376dce83ec0d21cef0 (diff)
nvme-tcp: fix incorrect h2cdata pdu offset accounting
[ Upstream commit e371af033c560b9dd1e861f8f0b503142bf0a06c ] When the controller sends us multiple r2t PDUs in a single request we need to account for it correctly as our send/recv context run concurrently (i.e. we get a new r2t with r2t_offset before we updated our iterator and req->data_sent marker). This can cause wrong offsets to be sent to the controller. To fix that, we will first know that this may happen only in the send sequence of the last page, hence we will take the r2t_offset to the h2c PDU data_offset, and in nvme_tcp_try_send_data loop, we make sure to increment the request markers also when we completed a PDU but we are expecting more r2t PDUs as we still did not send the entire data of the request. Fixes: 825619b09ad3 ("nvme-tcp: fix possible use-after-completion") Reported-by: Nowak, Lukasz <Lukasz.Nowak@Dell.com> Tested-by: Nowak, Lukasz <Lukasz.Nowak@Dell.com> 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: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/spi')
0 files changed, 0 insertions, 0 deletions