summaryrefslogtreecommitdiffstats
path: root/include/crypto
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-04-18 18:03:50 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2017-04-18 18:03:50 +0200
commit5ee4c5a92993458c6beaba76c087227675fc3ccd (patch)
tree022ac74901068e78a6236b24e40c2939d7ea7d8c /include/crypto
parentMerge branch 'parisc-4.11-5' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff)
parentcrypto: algif_aead - Fix bogus request dereference in completion function (diff)
downloadlinux-5ee4c5a92993458c6beaba76c087227675fc3ccd.tar.xz
linux-5ee4c5a92993458c6beaba76c087227675fc3ccd.zip
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu: "This fixes the following problems: - regression in new XTS/LRW code when used with async crypto - long-standing bug in ahash API when used with certain algos - bogus memory dereference in async algif_aead with certain algos" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: algif_aead - Fix bogus request dereference in completion function crypto: ahash - Fix EINPROGRESS notification callback crypto: lrw - Fix use-after-free on EINPROGRESS crypto: xts - Fix use-after-free on EINPROGRESS
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/internal/hash.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/crypto/internal/hash.h b/include/crypto/internal/hash.h
index 1d4f365d8f03..f6d9af3efa45 100644
--- a/include/crypto/internal/hash.h
+++ b/include/crypto/internal/hash.h
@@ -166,6 +166,16 @@ static inline struct ahash_instance *ahash_alloc_instance(
return crypto_alloc_instance2(name, alg, ahash_instance_headroom());
}
+static inline void ahash_request_complete(struct ahash_request *req, int err)
+{
+ req->base.complete(&req->base, err);
+}
+
+static inline u32 ahash_request_flags(struct ahash_request *req)
+{
+ return req->base.flags;
+}
+
static inline struct crypto_ahash *crypto_spawn_ahash(
struct crypto_ahash_spawn *spawn)
{