]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-tcp: fix data digest pointer calculation
authorVarun Prakash <varun@chelsio.com>
Mon, 25 Oct 2021 17:17:30 +0000 (22:47 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Nov 2021 18:46:13 +0000 (19:46 +0100)
commita6116df201a64f83400b3d2bd085d116c00a38c2
tree23aa5b845cd39de74d762cb8b3f289578c369a8f
parent40f394b99bc322ead9da24bcf78ac3c2dd9dac80
nvme-tcp: fix data digest pointer calculation

commit d89b9f3bbb58e9e378881209756b0723694f22ff upstream.

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: 1fcf4b8ae898 ("nvme-tcp: add NVMe over TCP host driver")
Signed-off-by: Varun Prakash <varun@chelsio.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvme/host/tcp.c