diff options
author | Elad Grupi <elad.grupi@dell.com> | 2021-03-16 17:44:25 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2021-03-18 05:39:18 +0100 |
commit | bac04454ef9fada009f0572576837548b190bf94 (patch) | |
tree | d40b2ebf6117bcfe97bad93a2d02d5ec46fda852 /drivers | |
parent | d218a8a3003e84ab136e69a4e30dd4ec7dab2d22 (diff) |
nvmet-tcp: fix kmap leak when data digest in use
When data digest is enabled we should unmap pdu iovec before handling
the data digest pdu.
Signed-off-by: Elad Grupi <elad.grupi@dell.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/nvme/target/tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c index 8b0485ada315..d658c6e8263a 100644 --- a/drivers/nvme/target/tcp.c +++ b/drivers/nvme/target/tcp.c @@ -1098,11 +1098,11 @@ static int nvmet_tcp_try_recv_data(struct nvmet_tcp_queue *queue) cmd->rbytes_done += ret; } + nvmet_tcp_unmap_pdu_iovec(cmd); if (queue->data_digest) { nvmet_tcp_prep_recv_ddgst(cmd); return 0; } - nvmet_tcp_unmap_pdu_iovec(cmd); if (!(cmd->flags & NVMET_TCP_F_INIT_FAILED) && cmd->rbytes_done == cmd->req.transfer_len) { |