OSDN Git Service

tls: Fix zerocopy_from_iter iov handling
authorBoris Pismenny <borisp@mellanox.com>
Fri, 13 Jul 2018 11:33:44 +0000 (14:33 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Sep 2018 06:39:39 +0000 (08:39 +0200)
commitcc55678dd2f8cdbbec8c8403710cc2ffb209f422
tree49315224e6aa029eb056a5e723da874de5e38b59
parent88b8d17d3ab0dc62da11a19fc39b3b2bca21912a
tls: Fix zerocopy_from_iter iov handling

[ Upstream commit 4718799817c5a30ae723eda21f3a6c7d8701b1a4 ]

zerocopy_from_iter iterates over the message, but it doesn't revert the
updates made by the iov iteration. This patch fixes it. Now, the iov can
be used after calling zerocopy_from_iter.

Fixes: 3c4d75591 ("tls: kernel TLS support")
Signed-off-by: Boris Pismenny <borisp@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/tls/tls_sw.c