]> git.baikalelectronics.ru Git - kernel.git/commit
enable interrupts in user path of page fault.
authorSteven Rostedt <rostedt@goodmis.org>
Thu, 7 Jun 2007 03:34:04 +0000 (23:34 -0400)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 8 Jun 2007 00:05:03 +0000 (17:05 -0700)
commit4789cc4c958d824a89a72bea7bc460786350b771
tree7ebba42dc0a402ef54bcbd4552e1fe47c519de2b
parent7563b06c08c69b5a3e1c2607bc1c7b8342950757
enable interrupts in user path of page fault.

This is a minor fix, but what is currently there is essentially wrong.
In do_page_fault, if the faulting address from user code happens to be
in kernel address space (int *p = (int*)-1; p = 0xbed;)  then the
do_page_fault handler will jump over the local_irq_enable with the

  goto bad_area_nosemaphore;

But the first line there sees this is user code and goes through the
process of sending a signal to send SIGSEGV to the user task. This whole
time interrupts are disabled and the task can not be preempted by a
higher priority task.

This patch always enables interrupts in the user path of the
bad_area_nosemaphore.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/i386/mm/fault.c
arch/x86_64/mm/fault.c