[Top] [All Lists]

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

Subject: [PATCH v2] MIPS: init module specific mips_hi16_list to NULL
From: Tony Wu <>
Date: Fri, 10 Aug 2012 22:49:35 +0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=O62PrF/a1dgPfsStQH2Ig1vO/Mku2KfWlVK9tSLdPqA=; b=Ushvb1OCh+QoGEWT9xxvbYUF2+NmWDZYjcgr5cofNs9+aCCJ9PStUjN8wQsjSXNAwE f3TT1hyLF+0JADCIXkAaitywyaGMcgZ1a/IoMYO4bb38mZJeD0I8cMLpJtiCAYiC3J/N O3RtCt9pqi1xG5AuYvEv/7dswY+WB0qya8o8sj3KMTtSJbEVepaMAZJ2+ZfdAKoQz9Y5 /rk8oy7vGI6GxIloyLrfN4KBn+VBMZiy2EPnjjFUHZj1VLa6Ax6E9Au2UDZkpOKRiZuR /P28WH83M9Mu+1kHLLMgZNEByzo4AjCyAtVPNF9ajVUb/0y2wPggf3BVLg4JoSVAtTm5 RU1A==
List-archive: <>
List-help: <>
List-id: linux-mips <>
List-owner: <>
List-post: <>
List-software: Ecartis version 1.0.0
List-subscribe: <>
List-unsubscribe: <>
User-agent: Mutt/1.5.21 (2010-09-15)
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 <>
 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,
+       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

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH v2] MIPS: init module specific mips_hi16_list to NULL, Tony Wu <=