--- x/net/tls/tls_sw.c +++ y/net/tls/tls_sw.c @@ -2421,14 +2421,17 @@ void tls_sw_release_resources_tx(struct struct tls_rec *rec, *tmp; int pending; +again: /* Wait for any pending async encryptions to complete */ 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); + if (pending) { + schedule_timeout_uninterruptible(HZ); + goto again; + } tls_tx_records(sk, -1);