UPSTREAM: tls: Fix improper revert in zerocopy_from_iter
The current code is problematic because the iov_iter is reverted and
never advanced in the non-error case. This patch skips the revert in the
non-error case. This patch also fixes the amount by which the iov_iter
is reverted. Currently, iov_iter is reverted by size, which can be
greater than the amount by which the iter was actually advanced.
Instead, only revert by the amount that the iter was advanced.
Fixes: 4718799817c5 ("tls: Fix zerocopy_from_iter iov handling")
Change-Id: I2b7ed6cbb67c03f67025cc9eed42b6d960106c69
Signed-off-by:
Doron Roberts-Kedes <doronrk@fb.com>
Signed-off-by:
David S. Miller <davem@davemloft.net>
Loading
Please register or sign in to comment