diff options
author | David S. Miller <davem@davemloft.net> | 2020-10-05 17:33:26 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-10-05 18:40:01 -0700 |
commit | 8b0308fe319b8002753ea66f8f940fb393792ddd (patch) | |
tree | 4c5a80346308db8cac9ff0951bb10e892c2387ad /net/tls | |
parent | f4f9dcc3f4c5f576ee195bdf0fd1682da7a3a73a (diff) | |
parent | 7575fdda569b2a2e8be32c1a64ecb05d6f96a500 (diff) | |
download | linux-8b0308fe319b8002753ea66f8f940fb393792ddd.tar.bz2 |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Rejecting non-native endian BTF overlapped with the addition
of support for it.
The rest were more simple overlapping changes, except the
renesas ravb binding update, which had to follow a file
move as well as a YAML conversion.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tls')
-rw-r--r-- | net/tls/tls_sw.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index 9a3d9fedd7aa..95ab5545a931 100644 --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c @@ -2143,10 +2143,15 @@ void tls_sw_release_resources_tx(struct sock *sk) struct tls_context *tls_ctx = tls_get_ctx(sk); struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx); struct tls_rec *rec, *tmp; + int pending; /* Wait for any pending async encryptions to complete */ - smp_store_mb(ctx->async_notify, true); - if (atomic_read(&ctx->encrypt_pending)) + spin_lock_bh(&ctx->encrypt_compl_lock); + ctx->async_notify = true; + pending = atomic_read(&ctx->encrypt_pending); + spin_unlock_bh(&ctx->encrypt_compl_lock); + + if (pending) crypto_wait_req(-EINPROGRESS, &ctx->async_wait); tls_tx_records(sk, -1); |