diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-04-18 09:03:50 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-04-18 09:03:50 -0700 |
commit | 5ee4c5a92993458c6beaba76c087227675fc3ccd (patch) | |
tree | 022ac74901068e78a6236b24e40c2939d7ea7d8c /include | |
parent | 20bb78f6b3d1edfdfd52b8a05d2f4f111877618e (diff) | |
parent | e6534aebb26e32fbab14df9c713c65e8507d17e4 (diff) | |
download | linux-5ee4c5a92993458c6beaba76c087227675fc3ccd.tar.bz2 |
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')
-rw-r--r-- | include/crypto/internal/hash.h | 10 |
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) { |