diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-01-10 19:09:34 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-01-10 19:09:34 -0500 |
commit | 88fb61e4ba263685a0d5b82c7e9cd6f22a9e6a9d (patch) | |
tree | c03d8917ea8253c118bec12949c34595d7311bcd | |
parent | d3ead3a206effab210813eafff4bfaa581295252 (diff) | |
parent | 490fe3f05be3f7c87d7932bcb6e6e53e3db2cd9c (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
[CRYPTO] padlock: Fix alignment fault in aes_crypt_copy
-rw-r--r-- | drivers/crypto/padlock-aes.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/crypto/padlock-aes.c b/drivers/crypto/padlock-aes.c index a337b693b6c9..5f7e71810489 100644 --- a/drivers/crypto/padlock-aes.c +++ b/drivers/crypto/padlock-aes.c | |||
@@ -429,8 +429,8 @@ static inline void padlock_xcrypt(const u8 *input, u8 *output, void *key, | |||
429 | 429 | ||
430 | static void aes_crypt_copy(const u8 *in, u8 *out, u32 *key, struct cword *cword) | 430 | static void aes_crypt_copy(const u8 *in, u8 *out, u32 *key, struct cword *cword) |
431 | { | 431 | { |
432 | u8 tmp[AES_BLOCK_SIZE * 2] | 432 | u8 buf[AES_BLOCK_SIZE * 2 + PADLOCK_ALIGNMENT - 1]; |
433 | __attribute__ ((__aligned__(PADLOCK_ALIGNMENT))); | 433 | u8 *tmp = PTR_ALIGN(&buf[0], PADLOCK_ALIGNMENT); |
434 | 434 | ||
435 | memcpy(tmp, in, AES_BLOCK_SIZE); | 435 | memcpy(tmp, in, AES_BLOCK_SIZE); |
436 | padlock_xcrypt(tmp, out, key, cword); | 436 | padlock_xcrypt(tmp, out, key, cword); |