summaryrefslogtreecommitdiff
path: root/include/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2009-07-15 21:16:05 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2009-07-15 21:16:05 +0800
commitfa64966473830219fe74952029ddb0e981a87749 (patch)
treefaabb5f9b644f00f41d22bf6aa9bb9608e247720 /include/crypto
parenta70c522520d967844c01fa01459edc698fc54544 (diff)
downloadlinux-exynos-fa64966473830219fe74952029ddb0e981a87749.tar.gz
linux-exynos-fa64966473830219fe74952029ddb0e981a87749.tar.bz2
linux-exynos-fa64966473830219fe74952029ddb0e981a87749.zip
crypto: shash - Fix digest size offset
When an shash algorithm is exported as ahash, ahash will access its digest size through hash_alg_common. That's why the shash layout needs to match hash_alg_common. This wasn't the case because the alignment weren't identical. This patch fixes the problem. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/hash.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/crypto/hash.h b/include/crypto/hash.h
index 3e89ce16b59c..26cb1eb16f4c 100644
--- a/include/crypto/hash.h
+++ b/include/crypto/hash.h
@@ -75,7 +75,8 @@ struct shash_alg {
unsigned int descsize;
/* These fields must match hash_alg_common. */
- unsigned int digestsize;
+ unsigned int digestsize
+ __attribute__ ((aligned(__alignof__(struct hash_alg_common))));
unsigned int statesize;
struct crypto_alg base;