summaryrefslogtreecommitdiffstats
path: root/net/tls
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-12-22 00:06:20 +0100
committerDavid S. Miller <davem@davemloft.net>2018-12-22 00:06:20 +0100
commitce28bb4453880759c5bdc2751629f1a865ea4a6e (patch)
tree549617a3c6ffb55402cb403b1d808a11e113b294 /net/tls
parentMerge branch 'skb_ext-fixes' (diff)
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc (diff)
downloadlinux-ce28bb4453880759c5bdc2751629f1a865ea4a6e.tar.xz
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.