[CRYPTO] api: Align tfm context as wide as possible
[powerpc.git] / crypto / api.c
index e26156f..34e02ca 100644 (file)
@@ -165,7 +165,7 @@ static unsigned int crypto_ctxsize(struct crypto_alg *alg, int flags)
                break;
        }
 
-       return len + alg->cra_alignmask;
+       return len + (alg->cra_alignmask & ~(crypto_tfm_ctx_alignment() - 1));
 }
 
 struct crypto_tfm *crypto_alloc_tfm(const char *name, u32 flags)