]> git.baikalelectronics.ru Git - kernel.git/commit
nvmet-tcp: fix data digest pointer calculation
authorVarun Prakash <varun@chelsio.com>
Mon, 25 Oct 2021 17:16:54 +0000 (22:46 +0530)
committerChristoph Hellwig <hch@lst.de>
Wed, 27 Oct 2021 05:58:26 +0000 (07:58 +0200)
commite790de54e94a7a15fb725b34724d41d41cbaa60c
treed7df9a09a623ef1220653f61a8d2aff57e460b8f
parentd89b9f3bbb58e9e378881209756b0723694f22ff
nvmet-tcp: fix data digest pointer calculation

exp_ddgst is of type __le32, &cmd->exp_ddgst + cmd->offset increases
&cmd->exp_ddgst by 4 * cmd->offset, fix this by type casting
&cmd->exp_ddgst to u8 *.

Fixes: 872d26a391da ("nvmet-tcp: add NVMe over TCP target driver")
Signed-off-by: Varun Prakash <varun@chelsio.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/tcp.c