diff options
author | David S. Miller <davem@davemloft.net> | 2018-12-22 00:06:20 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-12-22 00:06:20 +0100 |
commit | ce28bb4453880759c5bdc2751629f1a865ea4a6e (patch) | |
tree | 549617a3c6ffb55402cb403b1d808a11e113b294 /net/tls | |
parent | Merge branch 'skb_ext-fixes' (diff) | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc (diff) | |
download | linux-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.c | 10 |
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. |