[PATCH v2] MIPS: init module specific mips_hi16_list to NULL

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

 



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.

Signed-off-by: Tony Wu <tung7970@xxxxxxxxx>
---
 arch/mips/kernel/module.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/mips/kernel/module.c b/arch/mips/kernel/module.c
index 8b29976..8e1fb80 100644
--- a/arch/mips/kernel/module.c
+++ b/arch/mips/kernel/module.c
@@ -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
-- 
1.7.4.4




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux