LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] call sysrq_timer_list_show from a workqueue
@ 2008-01-08  6:31 Kyle McMartin
  2008-01-08  9:17 ` Ingo Molnar
  0 siblings, 1 reply; 16+ messages in thread
From: Kyle McMartin @ 2008-01-08  6:31 UTC (permalink / raw)
  To: linux-kernel; +Cc: tglx, mingo

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,

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2008-01-09 21:59 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-08  6:31 [PATCH] call sysrq_timer_list_show from a workqueue Kyle McMartin
2008-01-08  9:17 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).