From: lepton <ytht.net@gmail.com>
To: jdike@karaya.com
Cc: lkm <linux-kernel@vger.kernel.org>
Subject: [RFC PATCH] 2.6.22.6 user-mode linux: before abort, we make it sure all children quit
Date: Sat, 22 Sep 2007 16:01:24 +0800 [thread overview]
Message-ID: <20070922080124.GA7431@router.lepton.home> (raw)
In a stock 2.6.22.6 kernel, poweroff a user mode linux guest
(2.6.22.6 running in skas0 mode) will halt the host linux. I
think the reason is the kernel thread abort because of a bug.
Then the sys_reboot in process of user mode linux guest is
not trapped by the user mode linux kernel and is executed by host.
I think it is better to make sure all of our children process
to quit when user mode linux kernel abort.
Signed-off-by: Lepton Wu <ytht.net@gmail.com>
diff -X linux-2.6.22.6/Documentation/dontdiff -pru linux-2.6.22.6/arch/um/os-Linux/util.c linux-2.6.22.6-lepton/arch/um/os-Linux/util.c
--- linux-2.6.22.6/arch/um/os-Linux/util.c 2007-09-14 17:41:10.000000000 +0800
+++ linux-2.6.22.6-lepton/arch/um/os-Linux/util.c 2007-09-22 13:56:05.000000000 +0800
@@ -106,5 +106,6 @@ int setjmp_wrapper(void (*proc)(void *,
void os_dump_core(void)
{
signal(SIGSEGV, SIG_DFL);
+ kill(0, SIGTERM);
abort();
}
next reply other threads:[~2007-09-22 8:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-22 8:01 lepton [this message]
2007-09-25 17:53 ` 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=20070922080124.GA7431@router.lepton.home \
--to=ytht.net@gmail.com \
--cc=jdike@karaya.com \
--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®