diff --git a/crypto/algapi.c b/crypto/algapi.c index abf100c054e0a3472eb6f3de0fdd3e98171fbcbf..3c079b7f23f6bada906f9d444a50cd15b0831d65 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c @@ -980,7 +980,8 @@ EXPORT_SYMBOL_GPL(crypto_xor); unsigned int crypto_alg_extsize(struct crypto_alg *alg) { - return alg->cra_ctxsize; + return alg->cra_ctxsize + + (alg->cra_alignmask & ~(crypto_tfm_ctx_alignment() - 1)); } EXPORT_SYMBOL_GPL(crypto_alg_extsize);