From: Ingo Molnar <mingo@elte.hu>
To: Jeff Dike <jdike@addtoit.com>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] [patch] uml fixes, 2.6.1-mm5-A2
Date: Thu, 22 Jan 2004 17:21:39 +0100 [thread overview]
Message-ID: <20040122162139.GA28167@elte.hu> (raw)
In-Reply-To: <20040120200105.GA2289@elte.hu>
the patch below fixes a bug in UML that i've reproduced under 2.6.1-mm5.
The bug hits in the following race scenario: if userspace() is just
about to handle a SIGTRAP signal that it wants to relay_signal(), and
SIGVTALRM hits the context before this happens but after is_user is set
to 1 in userspace(), then we get a kernelspace-signal panic. Ought to be
rare but definitely triggerable.
Ingo
--- linux/arch/um/kernel/skas/trap_user.c.orig
+++ linux/arch/um/kernel/skas/trap_user.c
@@ -19,8 +19,10 @@ void sig_handler_common_skas(int sig, vo
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);
@@ -32,6 +34,7 @@ void sig_handler_common_skas(int sig, vo
(*info->handler)(sig, (union uml_pt_regs *) r);
+ r->is_user = save_user;
errno = save_errno;
}
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2004-01-22 16:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-20 19:17 [uml-devel] [patch] uml-fixes-2.6.1-mm5-A1 Ingo Molnar
2004-01-20 19:43 ` [uml-devel] [patch] uml-fixes2-2.6.1-mm5-A0 Ingo Molnar
2004-01-20 20:01 ` [uml-devel] [patch] uml-fixes2-2.6.1-mm5-A1 Ingo Molnar
2004-01-22 16:21 ` Ingo Molnar [this message]
2004-01-22 18:42 ` [uml-devel] [patch] uml fixes, 2.6.1-mm5-A2 Jeff Dike
2004-01-23 6:18 ` nsb034
2004-01-28 4:39 ` Jeff Dike
2004-01-23 9:35 ` [uml-devel] " Ingo Molnar
2004-01-23 13:56 ` Jeff Dike
2004-01-23 13:51 ` Ingo Molnar
2004-01-23 16:09 ` Jeff Dike
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=20040122162139.GA28167@elte.hu \
--to=mingo@elte.hu \
--cc=jdike@addtoit.com \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.