diff options
author | David S. Miller <davem@davemloft.net> | 2018-12-22 02:06:20 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-12-22 02:06:20 +0300 |
commit | ce28bb4453880759c5bdc2751629f1a865ea4a6e (patch) | |
tree | 549617a3c6ffb55402cb403b1d808a11e113b294 /net/tls/tls_sw.c | |
parent | 64935310f2fc0128373bbbcfb5b8b49fd26e2ae8 (diff) | |
parent | 6cafab50eea327e0d198cc9579a60440fc959756 (diff) | |
download | linux-ce28bb4453880759c5bdc2751629f1a865ea4a6e.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/tls/tls_sw.c')
-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. |