* [PATCH] nvmet-tcp: fix kmap leak when data digest in use
@ 2021-03-16 15:44 elad.grupi
2021-03-16 18:29 ` Sagi Grimberg
2021-03-18 4:39 ` Christoph Hellwig
0 siblings, 2 replies; 3+ messages in thread
From: elad.grupi @ 2021-03-16 15:44 UTC (permalink / raw)
To: sagi, linux-nvme; +Cc: Elad Grupi
From: Elad Grupi <elad.grupi@dell.com>
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>
---
drivers/nvme/target/tcp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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) {
--
2.18.2
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] nvmet-tcp: fix kmap leak when data digest in use
2021-03-16 15:44 [PATCH] nvmet-tcp: fix kmap leak when data digest in use elad.grupi
@ 2021-03-16 18:29 ` Sagi Grimberg
2021-03-18 4:39 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Sagi Grimberg @ 2021-03-16 18:29 UTC (permalink / raw)
To: elad.grupi, linux-nvme
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nvmet-tcp: fix kmap leak when data digest in use
2021-03-16 15:44 [PATCH] nvmet-tcp: fix kmap leak when data digest in use elad.grupi
2021-03-16 18:29 ` Sagi Grimberg
@ 2021-03-18 4:39 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2021-03-18 4:39 UTC (permalink / raw)
To: elad.grupi; +Cc: sagi, linux-nvme
Thanks,
applied to nvme-5.12.
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-18 4:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-16 15:44 [PATCH] nvmet-tcp: fix kmap leak when data digest in use elad.grupi
2021-03-16 18:29 ` Sagi Grimberg
2021-03-18 4:39 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).