dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/arch/x86
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
..
boot x86, build: Make sure mkpiggy fails on read error 2011-03-01 16:32:03 -08:00
configs defconfig reduction 2010-08-14 22:26:53 +02:00
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2011-01-13 10:25:58 -08:00
ia32 BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
include/asm x86, UV: Initialize the broadcast assist unit base destination node id properly 2011-03-09 16:36:16 +01:00
kernel x86: Don't check for BIOS corruption in first 64K when there's no need to 2011-03-09 16:36:41 +01:00
kvm KVM: SVM: Advance instruction pointer in dr_intercept 2011-02-22 16:01:44 +02:00
lguest LGUEST_GUEST: fix unmet direct dependencies (VIRTUALIZATION && VIRTIO) 2011-01-20 21:37:30 +10:30
lib x86: udelay: Use this_cpu_read to avoid address calculation 2011-01-04 06:08:55 +01:00
math-emu x86, fpu: Unbreak FPU emulation 2010-05-10 13:37:16 -07:00
mm x86/mm: Handle mm_fault_error() in kernel space 2011-03-10 09:41:40 +01:00
oprofile Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-01-11 11:02:13 -08:00
pci Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2011-01-14 09:29:05 -08:00
platform x86, UV: Initialize the broadcast assist unit base destination node id properly 2011-03-09 16:36:16 +01:00
power x86, tsc, sched: Recompute cyc2ns_offset's during resume from sleep states 2010-08-20 14:59:02 +02:00
tools
vdso x86, gcc-4.6: Use gcc -m options when building vdso 2010-12-13 16:08:37 -08:00
video
xen xen/setup: Route halt operations to safe_halt pvop. 2011-01-27 12:00:24 -05:00
.gitignore
Kbuild x86: Add platform directory 2010-10-27 14:30:01 +02:00
Kconfig kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT 2011-01-20 17:02:05 -08:00
Kconfig.cpu kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT 2011-01-20 17:02:05 -08:00
Kconfig.debug kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT 2011-01-20 17:02:05 -08:00
Makefile Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-10-21 13:06:00 -07:00
Makefile_32.cpu jump label: Add work around to i386 gcc asm goto bug 2010-10-29 14:45:29 -04:00