Skip to contentSkip to conversation

MIPS: init module specific mips_hi16_list to NULL

PATCH New Tony Wu 1 participant 1 message Aug 10, 2012 MIPS

lore
Share & tools
lore

Tony Wu

author
#0 lore raw

PATCH v2 1/1 MIPS: init module specific mips_hi16_list to NULL

In commit 6c06adb3838d03a20af2e2effc145121444c3189 (lmo) [MIPS: Fix race condition in module relocation code.], mips_hi16_list was moved from global to mod_arch_specific to handle parallel module loading. While global, it was bss initialized to zero, when moved to mod_arch_specific, we have to do the zero initialization manually.

---
 arch/mips/kernel/module.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/mips/kernel/module.c +1 -0
index 8b29976..8e1fb80 100644
@@ -276,6 +276,7 @@ int apply_relocate(Elf_Shdr *sechdrs, const char *strtab,
 	pr_debug("Applying relocate section %u to %u\n", relsec,
 	       sechdrs[relsec].sh_info);
 
+	me->arch.r_mips_hi16_list = NULL;
 	for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
 		/* This is where to make the change */
 		location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
Signature · 1 line
1.7.4.4