]> git.baikalelectronics.ru Git - kernel.git/commit
nvmet-tcp: pass iov_len instead of sg->length to bvec_set_page()
authorVarun Prakash <varun@chelsio.com>
Wed, 9 Aug 2023 10:26:45 +0000 (15:56 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Sep 2023 09:11:08 +0000 (11:11 +0200)
commit64561352c0f2140ff1ee9b4f5d920bc1fce6b56e
treed24199eddc4636b92fc4bef9152931e8f027a4ac
parent5ee5c928dbb6dfb8f613efc2688eddf311c74e23
nvmet-tcp: pass iov_len instead of sg->length to bvec_set_page()

[ Upstream commit 1f0bbf28940cf5edad90ab57b62aa8197bf5e836 ]

iov_len is the valid data length, so pass iov_len instead of sg->length to
bvec_set_page().

Fixes: 5bfaba275ae6 ("nvmet-tcp: don't map pages which can't come from HIGHMEM")
Signed-off-by: Rakshana Sridhar <rakshanas@chelsio.com>
Signed-off-by: Varun Prakash <varun@chelsio.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/target/tcp.c