Skip to content

Commit d89b9f3

Browse files
Varun PrakashChristoph Hellwig
authored andcommitted
nvme-tcp: fix data digest pointer calculation
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: 3f2304f ("nvme-tcp: add NVMe over TCP host driver") Signed-off-by: Varun Prakash <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent ce7723e commit d89b9f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/nvme/host/tcp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@ static int nvme_tcp_try_send_ddgst(struct nvme_tcp_request *req)
10541054
int ret;
10551055
struct msghdr msg = { .msg_flags = MSG_DONTWAIT };
10561056
struct kvec iov = {
1057-
.iov_base = &req->ddgst + req->offset,
1057+
.iov_base = (u8 *)&req->ddgst + req->offset,
10581058
.iov_len = NVME_TCP_DIGEST_LENGTH - req->offset
10591059
};
10601060

0 commit comments

Comments
 (0)