From: Andreas Bombe <bombe@informatik.tu-muenchen.de>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] 2.2 keventd fix
Date: Tue, 20 Nov 2001 01:16:29 +0100 [thread overview]
Message-ID: <20011120011629.A11470@storm.local> (raw)
In the 2.2 version of keventd flush_scheduled_tasks() always oopses. It
adds a tq_struct with NULL routine to kick keventd to life which is
skipped by 2.4 run_task_queue() but the 2.2 one tries to execute it.
The following patch fixes that, I also added some spin locking from the
2.4 version which seems to be added after the backport. (patch against
2.2.20)
--- linux-2.2.orig/kernel/context.c Sun May 27 03:21:32 2001
+++ linux-2.2/kernel/context.c Mon Nov 19 04:04:37 2001
@@ -101,8 +101,10 @@
if (signal_pending(curtask)) {
while (waitpid(-1, (unsigned int *)0, __WALL|WNOHANG) > 0)
;
+ spin_lock_irq(&curtask->sigmask_lock);
flush_signals(curtask);
recalc_sigpending(curtask);
+ spin_unlock_irq(&curtask->sigmask_lock);
}
}
}
@@ -119,7 +121,8 @@
* The caller should hold no spinlocks and should hold no semaphores which could
* cause the scheduled tasks to block.
*/
-static struct tq_struct dummy_task;
+static void dummy_routine(void *whatever) {}
+static struct tq_struct dummy_task = { routine: dummy_routine };
void flush_scheduled_tasks(void)
{
--
Andreas Bombe <bombe@informatik.tu-muenchen.de> DSA key 0x04880A44
reply other threads:[~2001-11-20 0:17 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=20011120011629.A11470@storm.local \
--to=bombe@informatik.tu-muenchen.de \
--cc=alan@lxorguk.ukuu.org.uk \
--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