[PATCH] fix unaligned access in 64-bit apply_relocate_add

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Assuming, of course, that loc64 shouldn't be 8-byte masked, and that the
relocation address was correct.

Signed-off-by: Kyle McMartin <kyle@xxxxxxxxxxx>

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 */
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux