diff mbox

fix unaligned access in 64-bit apply_relocate_add

Message ID 20090828192425.GH19494@bombadil.infradead.org (mailing list archive)
State Rejected
Headers show

Commit Message

kyle mcmartin Aug. 28, 2009, 7:24 p.m. UTC
Assuming, of course, that loc64 shouldn't be 8-byte masked, and that the
relocation address was correct.

Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>

--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c
index 61ee0ee..eea810c 100644
--- a/arch/parisc/kernel/module.c
+++ b/arch/parisc/kernel/module.c
@@ -63,6 +63,7 @@ 
 #include <linux/bug.h>
 
 #include <asm/unwind.h>
+#include <asm/unaligned.h>
 
 #if 0
 #define DEBUGP printk
@@ -799,7 +800,7 @@  int apply_relocate_add(Elf_Shdr *sechdrs,
 			break;
 		case R_PARISC_DIR64:
 			/* 64-bit effective address */
-			*loc64 = val + addend;
+			put_unaligned(val + addend, loc64);
 			break;
 		case R_PARISC_SEGREL32:
 			/* 32-bit segment relative address */