summaryrefslogtreecommitdiffstats
path: root/arch/mips/include
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2012-08-08 16:59:43 +0200
committerRalf Baechle <ralf@linux-mips.org>2012-08-17 10:57:28 +0200
commit861667dc82f561e65336ea67f73021b782b4ff74 (patch)
tree822734b6d8c58b92e118215c27deb9bc61aeb2bc /arch/mips/include
parentMIPS: Fix memory leak in error path of HI16/LO16 relocation handling. (diff)
downloadlinux-861667dc82f561e65336ea67f73021b782b4ff74.tar.xz
linux-861667dc82f561e65336ea67f73021b782b4ff74.zip
MIPS: Fix race condition in module relocation code.
The relocation code was essentially taken from the 2.4 modutils which perform relocation in userspace. In 2.6 relocation of multiple modules may be performed in parallel by the in-kernel loader so the global variable mips_hi16_list won't fly anymore. Fix race by moving it into mod_arch_specific. [ralf@linux-mips.org: folded in Tony's followup fix. Thanks Tony!] Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Tony Wu <tung7970@gmail.com> Cc: linux-mips@linux-mips.org Patchwork: http://patchwork.linux-mips.org/patch/4189/
Diffstat (limited to 'arch/mips/include')
-rw-r--r--arch/mips/include/asm/module.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/mips/include/asm/module.h b/arch/mips/include/asm/module.h
index 7531ecd654d6..dca8bce8c7ab 100644
--- a/arch/mips/include/asm/module.h
+++ b/arch/mips/include/asm/module.h
@@ -10,6 +10,7 @@ struct mod_arch_specific {
struct list_head dbe_list;
const struct exception_table_entry *dbe_start;
const struct exception_table_entry *dbe_end;
+ struct mips_hi16 *r_mips_hi16_list;
};
typedef uint8_t Elf64_Byte; /* Type for a 8-bit quantity. */