summaryrefslogtreecommitdiff
path: root/crypto/api.c
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2017-11-29 12:47:41 +1100
committerJames Morris <james.l.morris@oracle.com>2017-11-29 12:47:41 +1100
commita43a1243adfa8cc682fd4dacab89910865c28031 (patch)
tree7aef00d973ddaeace8916dca0d2a5b5b33cd28de /crypto/api.c
parentf960b5ebd9ed09bc12e10c712bce82ab58ef0435 (diff)
parent65cb3654889e0b748abc7756260ca267705aee14 (diff)
downloadlinux-crypto-a43a1243adfa8cc682fd4dacab89910865c28031.tar.gz
linux-crypto-a43a1243adfa8cc682fd4dacab89910865c28031.zip
Merge tag 'v4.15-rc1' into next-seccomp
Linux 4.15-rc1
Diffstat (limited to 'crypto/api.c')
-rw-r--r--crypto/api.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/crypto/api.c b/crypto/api.c
index 941cd4c6..2a2479d1 100644
--- a/crypto/api.c
+++ b/crypto/api.c
@@ -24,6 +24,7 @@
#include <linux/sched/signal.h>
#include <linux/slab.h>
#include <linux/string.h>
+#include <linux/completion.h>
#include "internal.h"
LIST_HEAD(crypto_alg_list);
@@ -595,5 +596,17 @@ int crypto_has_alg(const char *name, u32 type, u32 mask)
}
EXPORT_SYMBOL_GPL(crypto_has_alg);
+void crypto_req_done(struct crypto_async_request *req, int err)
+{
+ struct crypto_wait *wait = req->data;
+
+ if (err == -EINPROGRESS)
+ return;
+
+ wait->err = err;
+ complete(&wait->completion);
+}
+EXPORT_SYMBOL_GPL(crypto_req_done);
+
MODULE_DESCRIPTION("Cryptographic core API");
MODULE_LICENSE("GPL");