diff options
Diffstat (limited to 'crypto/internal.h')
-rw-r--r-- | crypto/internal.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/crypto/internal.h b/crypto/internal.h index 03c00b0e6b60..b110b979b988 100644 --- a/crypto/internal.h +++ b/crypto/internal.h | |||
@@ -99,7 +99,14 @@ static inline void crypto_exit_proc(void) | |||
99 | static inline unsigned int crypto_digest_ctxsize(struct crypto_alg *alg, | 99 | static inline unsigned int crypto_digest_ctxsize(struct crypto_alg *alg, |
100 | int flags) | 100 | int flags) |
101 | { | 101 | { |
102 | return alg->cra_ctxsize; | 102 | unsigned int len = alg->cra_ctxsize; |
103 | |||
104 | if (alg->cra_alignmask) { | ||
105 | len = ALIGN(len, (unsigned long)alg->cra_alignmask + 1); | ||
106 | len += alg->cra_digest.dia_digestsize; | ||
107 | } | ||
108 | |||
109 | return len; | ||
103 | } | 110 | } |
104 | 111 | ||
105 | static inline unsigned int crypto_cipher_ctxsize(struct crypto_alg *alg, | 112 | static inline unsigned int crypto_cipher_ctxsize(struct crypto_alg *alg, |