]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[BLOCK] dm-crypt: Align IV to u64 for essiv
authorHerbert Xu <herbert@gondor.apana.org.au>
Sat, 2 Sep 2006 22:58:41 +0000 (08:58 +1000)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 7 Dec 2006 02:38:48 +0000 (18:38 -0800)
This patch makes the IV u64-aligned since essiv does a u64 store to it.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/md/dm-crypt.c

index 6dbaeee48ced47b45d71b38a8fd6bc9cf5256730..facf859b9b87a5dd5c0c0ff2e555602ad283ac2e 100644 (file)
@@ -272,7 +272,7 @@ crypt_convert_scatterlist(struct crypt_config *cc, struct scatterlist *out,
                           struct scatterlist *in, unsigned int length,
                           int write, sector_t sector)
 {
-       u8 iv[cc->iv_size];
+       u8 iv[cc->iv_size] __attribute__ ((aligned(__alignof__(u64))));
        struct blkcipher_desc desc = {
                .tfm = cc->tfm,
                .info = iv,