path: root/arch/arm/kernel/swp_emulate.c
diff options
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-20 17:56:23 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-20 17:56:23 -0800
commitf59dc2bb5a50b26ea751f9eac1c81e4cc7de5257 (patch)
tree4c1b3e0ea4bfbd8f9dd72ee95773f4be2dd087d2 /arch/arm/kernel/swp_emulate.c
parentf3dc1294c8a40d7eedd676b65f42f0b828fd3d8c (diff)
parente6ee4b2b57a8e0d8e551031173de080b338d3969 (diff)
Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM fixes from Russell King: "A number of smallish fixes scattered around the ARM code. Probably the most serious one is the one from Al addressing the missing locking in the swap emulation code." * 'fixes' of git://git.linaro.org/people/rmk/linux-arm: ARM: 7607/1: realview: fix private peripheral memory base for EB rev. B boards ARM: 7606/1: cache: flush to LoUU instead of LoUIS on uniprocessor CPUs ARM: missing ->mmap_sem around find_vma() in swp_emulate.c ARM: 7605/1: vmlinux.lds: Move .notes section next to the rodata ARM: 7602/1: Pass real "__machine_arch_type" variable to setup_machine_tags() procedure ARM: 7600/1: include CONFIG_DEBUG_LL_INCLUDE rather than mach/debug-macro.S
Diffstat (limited to 'arch/arm/kernel/swp_emulate.c')
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/kernel/swp_emulate.c b/arch/arm/kernel/swp_emulate.c
index df745188f5d..ab1017bd166 100644
--- a/arch/arm/kernel/swp_emulate.c
+++ b/arch/arm/kernel/swp_emulate.c
@@ -109,10 +109,12 @@ static void set_segfault(struct pt_regs *regs, unsigned long addr)
siginfo_t info;
+ down_read(&current->mm->mmap_sem);
if (find_vma(current->mm, addr) == NULL)
info.si_code = SEGV_MAPERR;
info.si_code = SEGV_ACCERR;
+ up_read(&current->mm->mmap_sem);
info.si_signo = SIGSEGV;
info.si_errno = 0;