diff options
| author | Andrey Vagin <[email protected]> | 2011-03-09 15:22:23 -0800 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2011-03-10 09:41:40 +0100 |
| commit | f86268549f424f83b9eb0963989270e14fbfc3de (patch) | |
| tree | 55fb3f1755a5cb8d81daecfef3aa84bb4ea340e8 /include/linux/uts.h | |
| parent | a7bd1dafdcc13ec7add4aafc927eb5e3a8d597e6 (diff) | |
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'include/linux/uts.h')
0 files changed, 0 insertions, 0 deletions