From: Kyle McMartin <kyle@mcmartin.ca>
To: linux-kernel@vger.kernel.org
Cc: tglx@linutronix.de, mingo@redhat.com
Subject: [PATCH] call sysrq_timer_list_show from a workqueue
Date: Tue, 8 Jan 2008 01:31:13 -0500 [thread overview]
Message-ID: <20080108063113.GA21287@fattire.cabal.ca> (raw)
handle_sysrq can be called from interrupt context. sysrq_timer_list_show
eventually starts poking at module symbols which take the module mutex.
so instead, let's just kick off a workqueue.
[ doesn't happen on my laptop with the keyboard, but does when
triggered from /proc/sysrq-trigger ]
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
---
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
index de60e1e..09bb030 100644
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@ -159,10 +159,16 @@ static struct sysrq_key_op sysrq_sync_op = {
.enable_mask = SYSRQ_ENABLE_SYNC,
};
-static void sysrq_handle_show_timers(int key, struct tty_struct *tty)
+static void sysrq_show_timers_callback(struct work_struct *whocares)
{
sysrq_timer_list_show();
}
+static DECLARE_WORK(show_timers_work, sysrq_show_timers_callback);
+
+static void sysrq_handle_show_timers(int key, struct tty_struct *tty)
+{
+ schedule_work(&show_timers_work);
+}
static struct sysrq_key_op sysrq_show_timers_op = {
.handler = sysrq_handle_show_timers,
next reply other threads:[~2008-01-08 6:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-08 6:31 Kyle McMartin [this message]
2008-01-08 9:17 ` [PATCH] call sysrq_timer_list_show from a workqueue Ingo Molnar
2008-01-08 11:28 ` Rusty Russell
2008-01-08 11:33 ` Ingo Molnar
2008-01-08 11:50 ` Rusty Russell
2008-01-08 15:51 ` Ingo Molnar
2008-01-08 22:48 ` Rusty Russell
2008-01-08 22:52 ` Ingo Molnar
2008-01-09 0:21 ` Andrew Morton
2008-01-09 3:20 ` Rusty Russell
2008-01-09 3:33 ` Andrew Morton
2008-01-09 4:27 ` Rusty Russell
2008-01-09 4:45 ` Andrew Morton
2008-01-09 15:24 ` Paulo Marques
2008-01-09 21:58 ` Rusty Russell
2008-01-08 14:41 ` Kyle McMartin
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=20080108063113.GA21287@fattire.cabal.ca \
--to=kyle@mcmartin.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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.