]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Nov 2021 18:46:13 +0000 (19:46 +0100)
commit40f394b99bc322ead9da24bcf78ac3c2dd9dac80
tree316a92a53e6badc307a04fbdd345cf2e7291191d
parentc8865237842dcef0adfeaa6f85ce3bcc692f04a0
nvmet-tcp: fix data digest pointer calculation

commit e790de54e94a7a15fb725b34724d41d41cbaa60c upstream.

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: 1d48c1a32831 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvme/target/tcp.c