summaryrefslogtreecommitdiffstats
path: root/kernel/range.c
diff options
context:
space:
mode:
authorSagi Grimberg <sagi@grimberg.me>2022-06-24 00:49:53 +0300
committerChristoph Hellwig <hch@lst.de>2022-06-29 16:13:44 +0200
commited0691cf55140ce0f3fb100225645d902cce904b (patch)
tree9669ac49b47b63509c07c910416262adeee8958d /kernel/range.c
parentfbb564a557809466c171b95f8d593a0972450ff2 (diff)
downloadlinux-ed0691cf55140ce0f3fb100225645d902cce904b.tar.bz2
nvmet-tcp: fix regression in data_digest calculation
Data digest calculation iterates over command mapped iovec. However since commit bac04454ef9f we unmap the iovec before we handle the data digest, and since commit 69b85e1f1d1d we clear nr_mapped when we unmap the iov. Instead of open-coding the command iov traversal, simply call crypto_ahash_digest with the command sg that is already allocated (we already do that for the send path). Rename nvmet_tcp_send_ddgst to nvmet_tcp_calc_ddgst and call it from send and recv paths. Fixes: 69b85e1f1d1d ("nvmet-tcp: add an helper to free the cmd buffers") Fixes: bac04454ef9f ("nvmet-tcp: fix kmap leak when data digest in use") Signed-off-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'kernel/range.c')
0 files changed, 0 insertions, 0 deletions