summaryrefslogtreecommitdiffstats
path: root/net/tls
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-12-21 15:06:20 -0800
committerDavid S. Miller <davem@davemloft.net>2018-12-21 15:06:20 -0800
commitce28bb4453880759c5bdc2751629f1a865ea4a6e (patch)
tree549617a3c6ffb55402cb403b1d808a11e113b294 /net/tls
parent64935310f2fc0128373bbbcfb5b8b49fd26e2ae8 (diff)
parent6cafab50eea327e0d198cc9579a60440fc959756 (diff)
downloadlinux-ce28bb4453880759c5bdc2751629f1a865ea4a6e.tar.gz
linux-ce28bb4453880759c5bdc2751629f1a865ea4a6e.tar.bz2
linux-ce28bb4453880759c5bdc2751629f1a865ea4a6e.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/tls')
-rw-r--r--net/tls/tls_sw.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
index 5aee9ae5ca53..11cdc8f7db63 100644
--- a/net/tls/tls_sw.c
+++ b/net/tls/tls_sw.c
@@ -943,10 +943,12 @@ fallback_to_reg_send:
tls_ctx->tx.overhead_size);
}
- ret = sk_msg_memcopy_from_iter(sk, &msg->msg_iter, msg_pl,
- try_to_copy);
- if (ret < 0)
- goto trim_sgl;
+ if (try_to_copy) {
+ ret = sk_msg_memcopy_from_iter(sk, &msg->msg_iter,
+ msg_pl, try_to_copy);
+ if (ret < 0)
+ goto trim_sgl;
+ }
/* Open records defined only if successfully copied, otherwise
* we would trim the sg but not reset the open record frags.