]> asedeno.scripts.mit.edu Git - linux.git/commit
tls: Skip zerocopy path for ITER_KVEC
authorDoron Roberts-Kedes <doronrk@fb.com>
Wed, 25 Jul 2018 21:48:21 +0000 (14:48 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Jul 2018 21:11:34 +0000 (14:11 -0700)
commit0a26cf3ff47d9e70fbed2fa79b0678ee70e25113
tree2074e891ca6150854be948a07a4aa60d13ab3069
parent2ed9db3074fcd8d12709fe40ff0e691d74229818
tls: Skip zerocopy path for ITER_KVEC

The zerocopy path ultimately calls iov_iter_get_pages, which defines the
step function for ITER_KVECs as simply, return -EFAULT. Taking the
non-zerocopy path for ITER_KVECs avoids the unnecessary fallback.

See https://lore.kernel.org/lkml/20150401023311.GL29656@ZenIV.linux.org.uk/T/#u
for a discussion of why zerocopy for vmalloc data is not a good idea.

Discovered while testing NBD traffic encrypted with ktls.

Fixes: c46234ebb4d1 ("tls: RX path for ktls")
Signed-off-by: Doron Roberts-Kedes <doronrk@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tls/tls_sw.c