Commit 5a47e2f1 authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds

[PATCH] uml: fix a signal race

This patch saves and restores UML's idea of user mode across an interrupt. 
Without this, an interrupt arriving at the wrong time can cause UML to lose
track of whether an interrupted handler is handing a userspace interrupt.

From: Ingo Molnar
Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7e21b67f
......@@ -19,8 +19,10 @@ void sig_handler_common_skas(int sig, void *sc_ptr)
struct skas_regs *r;
struct signal_info *info;
int save_errno = errno;
int save_user;
r = &TASK_REGS(get_current())->skas;
save_user = r->is_user;
r->is_user = 0;
r->fault_addr = SC_FAULT_ADDR(sc);
r->fault_type = SC_FAULT_TYPE(sc);
......@@ -33,6 +35,7 @@ void sig_handler_common_skas(int sig, void *sc_ptr)
(*info->handler)(sig, (union uml_pt_regs *) r);
errno = save_errno;
r->is_user = save_user;
}
void user_signal(int sig, union uml_pt_regs *regs)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment