* [PATCH] nvme-tcp: fix data digest pointer calculation
@ 2021-10-25 17:17 Varun Prakash
2021-10-26 13:24 ` Sagi Grimberg
2021-10-27 5:57 ` Christoph Hellwig
0 siblings, 2 replies; 3+ messages in thread
From: Varun Prakash @ 2021-10-25 17:17 UTC (permalink / raw)
To: sagi, hch; +Cc: linux-nvme, varun
ddgst is of type __le32, &req->ddgst + req->offset
increases &req->ddgst by 4 * req->offset, fix this by
type casting &req->ddgst to u8 *.
Fixes: 3f2304f8c6d6 ("nvme-tcp: add NVMe over TCP host driver")
Signed-off-by: Varun Prakash <varun@chelsio.com>
---
drivers/nvme/host/tcp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index 3c1c29d..22da856 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -1051,7 +1051,7 @@ static int nvme_tcp_try_send_ddgst(struct nvme_tcp_request *req)
int ret;
struct msghdr msg = { .msg_flags = MSG_DONTWAIT };
struct kvec iov = {
- .iov_base = &req->ddgst + req->offset,
+ .iov_base = (u8 *)&req->ddgst + req->offset,
.iov_len = NVME_TCP_DIGEST_LENGTH - req->offset
};
--
2.0.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] nvme-tcp: fix data digest pointer calculation
2021-10-25 17:17 [PATCH] nvme-tcp: fix data digest pointer calculation Varun Prakash
@ 2021-10-26 13:24 ` Sagi Grimberg
2021-10-27 5:57 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Sagi Grimberg @ 2021-10-26 13:24 UTC (permalink / raw)
To: Varun Prakash, hch; +Cc: linux-nvme
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nvme-tcp: fix data digest pointer calculation
2021-10-25 17:17 [PATCH] nvme-tcp: fix data digest pointer calculation Varun Prakash
2021-10-26 13:24 ` Sagi Grimberg
@ 2021-10-27 5:57 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2021-10-27 5:57 UTC (permalink / raw)
To: Varun Prakash; +Cc: sagi, hch, linux-nvme
On Mon, Oct 25, 2021 at 10:47:30PM +0530, Varun Prakash wrote:
> ddgst is of type __le32, &req->ddgst + req->offset
> increases &req->ddgst by 4 * req->offset, fix this by
> type casting &req->ddgst to u8 *.
>
> Fixes: 3f2304f8c6d6 ("nvme-tcp: add NVMe over TCP host driver")
> Signed-off-by: Varun Prakash <varun@chelsio.com>
Same here.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-27 5:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-25 17:17 [PATCH] nvme-tcp: fix data digest pointer calculation Varun Prakash
2021-10-26 13:24 ` Sagi Grimberg
2021-10-27 5:57 ` Christoph Hellwig
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.