Patch to fix unaligned access during module loads. Tested by Doug (dchapman@redhat.com) on HP ia64 boxes, and by me on SGI ia64 box. Additionally tested by me on x86_64. Addresses and resolves BZ 210013. Signed-off-by: Prarit Bhargava Signed-off-by: Doug Chapman --- linux-2.6.17.ia64/lib/sha1.c.orig 2006-09-19 17:07:59.000000000 -0400 +++ linux-2.6.17.ia64/lib/sha1.c 2006-09-19 17:07:48.000000000 -0400 @@ -3,6 +3,7 @@ * Peter Gutmann, and placed in the public domain. */ +#include #include #include #include @@ -41,7 +42,7 @@ __u32 a, b, c, d, e, t, i; for (i = 0; i < 16; i++) - W[i] = be32_to_cpu(((const __be32 *)in)[i]); + W[i] = be32_to_cpu(get_unaligned((const __be32 *)in+i)); for (i = 0; i < 64; i++) W[i+16] = rol32(W[i+13] ^ W[i+8] ^ W[i+2] ^ W[i], 1);