From: Jeff Dike <jdike@addtoit.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] UML - Fix a signal race
Date: Tue, 14 Sep 2004 03:27:52 -0400 [thread overview]
Message-ID: <200409140727.i8E7RqL7005653@ccure.user-mode-linux.org> (raw)
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: Jeff Dike <jdike@addtoit.com>
Index: 2.6.9-rc2/arch/um/kernel/skas/trap_user.c
===================================================================
--- 2.6.9-rc2.orig/arch/um/kernel/skas/trap_user.c 2004-09-14 02:03:52.000000000 -0400
+++ 2.6.9-rc2/arch/um/kernel/skas/trap_user.c 2004-09-14 02:04:00.000000000 -0400
@@ -19,8 +19,10 @@
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 @@
(*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)
reply other threads:[~2004-09-14 6:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200409140727.i8E7RqL7005653@ccure.user-mode-linux.org \
--to=jdike@addtoit.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®