linux/arch/x86/mm
Andrey Vagin f86268549f x86/mm: Handle mm_fault_error() in kernel space
mm_fault_error() should not execute oom-killer, if page fault
occurs in kernel space.  E.g. in copy_from_user()/copy_to_user().

This would happen if we find ourselves in OOM on a
copy_to_user(), or a copy_from_user() which faults.

Without this patch, the kernels hangs up in copy_from_user(),
because OOM killer sends SIG_KILL to current process, but it
can't handle a signal while in syscall, then the kernel returns
to copy_from_user(), reexcute current command and provokes
page_fault again.

With this patch the kernel return -EFAULT from copy_from_user().

The code, which checks that page fault occurred in kernel space,
has been copied from do_sigbus().

This situation is handled by the same way on powerpc, xtensa,
tile, ...

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: <stable@kernel.org>
LKML-Reference: <201103092322.p29NMNPH001682@imap1.linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2011-03-10 09:41:40 +01:00
..
kmemcheck
amdtopology_64.c
dump_pagetables.c
extable.c
fault.c x86/mm: Handle mm_fault_error() in kernel space 2011-03-10 09:41:40 +01:00
gup.c
highmem_32.c
hugetlbpage.c
init_32.c
init_64.c
init.c
iomap_32.c
ioremap.c
kmmio.c
Makefile
memblock.c
memtest.c
mmap.c
mmio-mod.c
numa_32.c
numa_64.c
numa.c
pageattr-test.c
pageattr.c
pat_internal.h
pat_rbtree.c
pat.c
pf_in.c
pf_in.h
pgtable_32.c
pgtable.c
physaddr.c
physaddr.h
setup_nx.c
srat_32.c
srat_64.c
testmmiotrace.c
tlb.c