Merge tag 'v4.4.14' into linux-linaro-lsk-v4.4
[firefly-linux-kernel-4.4.55.git] / crypto / algif_skcipher.c
index a82804e2a9bddb0cedfebe1f1bfc9cfbb65c1dd9..f5e9f9310b4864929e6aa542011c69d038df20e1 100644 (file)
@@ -536,7 +536,7 @@ static int skcipher_recvmsg_async(struct socket *sock, struct msghdr *msg,
        sg_init_table(sreq->tsg, tx_nents);
        memcpy(iv, ctx->iv, ivsize);
        skcipher_request_set_tfm(req, tfm);
-       skcipher_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG,
+       skcipher_request_set_callback(req, CRYPTO_TFM_REQ_MAY_SLEEP,
                                      skcipher_async_cb, sreq);
 
        while (iov_iter_count(&msg->msg_iter)) {
@@ -950,7 +950,8 @@ static int skcipher_accept_parent_nokey(void *private, struct sock *sk)
        ask->private = ctx;
 
        skcipher_request_set_tfm(&ctx->req, skcipher);
-       skcipher_request_set_callback(&ctx->req, CRYPTO_TFM_REQ_MAY_BACKLOG,
+       skcipher_request_set_callback(&ctx->req, CRYPTO_TFM_REQ_MAY_SLEEP |
+                                                CRYPTO_TFM_REQ_MAY_BACKLOG,
                                      af_alg_complete, &ctx->completion);
 
        sk->sk_destruct = skcipher_sock_destruct;