]> git.baikalelectronics.ru Git - kernel.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)
commit213eea081f450326833c102d819e1be21a2b320b
tree2074e891ca6150854be948a07a4aa60d13ab3069
parent33403072142733d1ec24e92fea66bfb97e34d4a4
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: c74d3521d468 ("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