From: Rusty Russell <rusty@rustcorp.com.au>
To: Andrew Morton <akpm@osdl.org>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: tmolina@cablespeed.com, linux-kernel@vger.kernel.org
Subject: Re: 2.6.1-mm4
Date: Mon, 19 Jan 2004 22:29:41 +1100 [thread overview]
Message-ID: <20040119113132.CB82E2C2A1@lists.samba.org> (raw)
In-Reply-To: Your message of "Sat, 17 Jan 2004 10:52:39 -0800." <20040117105239.0b94f2b3.akpm@osdl.org>
In message <20040117105239.0b94f2b3.akpm@osdl.org> you write:
> Yes. ksoftirqd and the migration threads can now be killed off
> with `kill -9'.
Fix below.
Thanks,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
Name: Block Signals For Early Kthreads
Author: Rusty Russell
Status: Booted on 2.6.1-bk4
Depends: Hotcpu-New-Kthread/use-kthread-simple.patch.gz
D: Kthreads created at boot before "keventd" are spawned directly.
D: However, this means that they don't have all signals blocked, and
D: hence can be killed. The simplest solution is to always explicitly
D: block all signals in the kthread.
diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .29870-linux-2.6.1-mm4/kernel/kthread.c .29870-linux-2.6.1-mm4.updated/kernel/kthread.c
--- .29870-linux-2.6.1-mm4/kernel/kthread.c 2004-01-19 18:12:53.000000000 +1100
+++ .29870-linux-2.6.1-mm4.updated/kernel/kthread.c 2004-01-19 21:45:53.000000000 +1100
@@ -32,12 +32,18 @@ static int kthread(void *_create)
struct kthread_create_info *create = _create;
int (*threadfn)(void *data);
void *data;
+ sigset_t blocked;
int ret = -EINTR;
/* Copy data: it's on keventd's stack */
threadfn = create->threadfn;
data = create->data;
+ /* Block and flush all signals (in case we're not from keventd). */
+ sigfillset(&blocked);
+ sigprocmask(SIG_BLOCK, &blocked, NULL);
+ flush_signals(current);
+
/* OK, tell user we're spawned, wait for stop or wakeup */
__set_current_state(TASK_INTERRUPTIBLE);
complete(&create->started);
next prev parent reply other threads:[~2004-01-19 11:32 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-17 13:13 2.6.1-mm4 Thomas Molina
2004-01-17 18:14 ` 2.6.1-mm4 Hugh Dickins
2004-01-17 18:52 ` 2.6.1-mm4 Andrew Morton
2004-01-19 7:16 ` 2.6.1-mm4 Rusty Russell
2004-01-19 11:29 ` Rusty Russell [this message]
[not found] <20040115225948.6b994a48.akpm@osdl.org.suse.lists.linux.kernel>
[not found] ` <20040118001217.GE3125@werewolf.able.es.suse.lists.linux.kernel>
[not found] ` <20040117215535.0e4674b8.akpm@osdl.org.suse.lists.linux.kernel>
[not found] ` <20040118081128.GA3153@werewolf.able.es.suse.lists.linux.kernel>
[not found] ` <20040118001708.09291455.akpm@osdl.org.suse.lists.linux.kernel>
[not found] ` <20040119224219.65991501.rusty@rustcorp.com.au.suse.lists.linux.kernel>
2004-01-19 12:40 ` 2.6.1-mm4 Andi Kleen
2004-01-21 4:06 ` 2.6.1-mm4 Rusty Russell
2004-01-21 4:56 ` 2.6.1-mm4 Valdis.Kletnieks
2004-01-21 8:40 ` 2.6.1-mm4 Vojtech Pavlik
2004-01-21 12:27 ` 2.6.1-mm4 Andi Kleen
2004-01-21 12:34 ` 2.6.1-mm4 Vojtech Pavlik
2004-01-21 12:46 ` 2.6.1-mm4 Andi Kleen
2004-01-21 13:13 ` 2.6.1-mm4 Vojtech Pavlik
2004-01-22 1:31 ` 2.6.1-mm4 Rusty Russell
2004-01-21 12:53 ` 2.6.1-mm4 Dmitry Torokhov
-- strict thread matches above, loose matches on Subject: below --
2004-01-16 6:59 2.6.1-mm4 Andrew Morton
2004-01-16 6:59 ` 2.6.1-mm4 Andrew Morton
2004-01-16 9:34 ` 2.6.1-mm4 Prakash K. Cheemplavam
2004-01-16 9:34 ` 2.6.1-mm4 Prakash K. Cheemplavam
2004-01-21 18:46 ` 2.6.1-mm4 Prakash K. Cheemplavam
2004-01-21 18:46 ` 2.6.1-mm4 Prakash K. Cheemplavam
2004-01-21 19:20 ` 2.6.1-mm4 Valdis.Kletnieks
2004-02-11 22:22 ` 2.6.1-mm4 Prakash K. Cheemplavam
2004-02-12 5:52 ` 2.6.1-mm4 Valdis.Kletnieks
2004-02-12 7:30 ` 2.6.1-mm4 Prakash K. Cheemplavam
2004-02-12 8:46 ` 2.6.1-mm4 Valdis.Kletnieks
2004-02-12 13:15 ` 2.6.1-mm4 Prakash K. Cheemplavam
2004-02-12 16:11 ` 2.6.1-mm4 Prakash K. Cheemplavam
2004-01-16 13:45 ` 2.6.1-mm4 Ed Tomlinson
2004-01-16 13:45 ` 2.6.1-mm4 Ed Tomlinson
2004-01-16 17:32 ` 2.6.1-mm4 Thomas Schlichter
2004-01-16 14:49 ` 2.6.1-mm4 Fabian Fenaut
2004-01-16 14:49 ` 2.6.1-mm4 Fabian Fenaut
[not found] ` <200401161449.i0GEnoAv026627@fire-1.osdl.org>
2004-01-16 17:03 ` 2.6.1-mm4 Andrew Morton
2004-01-16 17:03 ` 2.6.1-mm4 Andrew Morton
2004-01-16 18:11 ` 2.6.1-mm4 Fabian Fenaut
2004-01-16 17:37 ` 2.6.1-mm4 Thomas Schlichter
2004-01-16 17:58 ` 2.6.1-mm4 Thomas Schlichter
2004-01-17 1:31 ` 2.6.1-mm4 Greg Fitzgerald
2004-01-17 1:40 ` 2.6.1-mm4 Mike Fedyk
2004-01-17 2:07 ` 2.6.1-mm4 Greg Fitzgerald
2004-01-17 2:24 ` 2.6.1-mm4 Mike Fedyk
2004-01-17 4:05 ` 2.6.1-mm4 Dmitry Torokhov
2004-01-17 4:22 ` 2.6.1-mm4 Greg Fitzgerald
2004-01-17 2:22 ` 2.6.1-mm4 Adrian Bunk
2004-01-17 2:22 ` 2.6.1-mm4 Adrian Bunk
2004-01-18 0:12 ` 2.6.1-mm4 J.A. Magallon
2004-01-18 5:55 ` 2.6.1-mm4 Andrew Morton
2004-01-18 8:11 ` 2.6.1-mm4 J.A. Magallon
2004-01-18 8:17 ` 2.6.1-mm4 Andrew Morton
2004-01-19 11:42 ` 2.6.1-mm4 Rusty Russell
2004-01-19 11:46 ` 2.6.1-mm4 Luiz Fernando Capitulino
2004-01-19 11:46 ` 2.6.1-mm4 Luiz Fernando Capitulino
2004-01-20 0:26 ` 2.6.1-mm4 Thomas Molina
2004-01-20 0:26 ` 2.6.1-mm4 Thomas Molina
2004-01-20 0:57 ` 2.6.1-mm4 Andrew Morton
2004-01-20 0:57 ` 2.6.1-mm4 Andrew Morton
2004-01-20 2:13 ` 2.6.1-mm4 Thomas Molina
2004-01-20 2:13 ` 2.6.1-mm4 Thomas Molina
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=20040119113132.CB82E2C2A1@lists.samba.org \
--to=rusty@rustcorp.com.au \
--cc=akpm@osdl.org \
--cc=hugh@veritas.com \
/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.