The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH RT] disable preemption on running show all regs.
@ 2007-06-19 20:17 Steven Rostedt
  2007-06-19 20:57 ` Daniel Walker
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2007-06-19 20:17 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Thomas Gleixner, LKML, RT

The show all regs sysrq uses the nmi function to do it. But this
function expects preemption to be off, or funny things happen.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

Index: linux-2.6.21-rt9/drivers/char/sysrq.c
===================================================================
--- linux-2.6.21-rt9.orig/drivers/char/sysrq.c
+++ linux-2.6.21-rt9/drivers/char/sysrq.c
@@ -213,7 +213,9 @@ static struct sysrq_key_op sysrq_showreg
 
 static void sysrq_handle_showallregs(int key, struct tty_struct *tty)
 {
+        preempt_disable();
 	nmi_show_all_regs();
+        preempt_enable();
 }
 
 static struct sysrq_key_op sysrq_showallregs_op = {



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

* Re: [PATCH RT] disable preemption on running show all regs.
  2007-06-19 20:17 [PATCH RT] disable preemption on running show all regs Steven Rostedt
@ 2007-06-19 20:57 ` Daniel Walker
  2007-06-19 21:36   ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Walker @ 2007-06-19 20:57 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Ingo Molnar, Thomas Gleixner, LKML, RT

On Tue, 2007-06-19 at 16:17 -0400, Steven Rostedt wrote:
> The show all regs sysrq uses the nmi function to do it. But this
> function expects preemption to be off, or funny things happen.
> 
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
> 
> Index: linux-2.6.21-rt9/drivers/char/sysrq.c
> ===================================================================
> --- linux-2.6.21-rt9.orig/drivers/char/sysrq.c
> +++ linux-2.6.21-rt9/drivers/char/sysrq.c
> @@ -213,7 +213,9 @@ static struct sysrq_key_op sysrq_showreg
>  
>  static void sysrq_handle_showallregs(int key, struct tty_struct *tty)
>  {
> +        preempt_disable();
>  	nmi_show_all_regs();
> +        preempt_enable();
>  }

Looks like you have a whitespace issue here.. Should be tabs, not
spaces.

Daniel


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

* Re: [PATCH RT] disable preemption on running show all regs.
  2007-06-19 20:57 ` Daniel Walker
@ 2007-06-19 21:36   ` Steven Rostedt
  0 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2007-06-19 21:36 UTC (permalink / raw)
  To: Daniel Walker; +Cc: Ingo Molnar, Thomas Gleixner, LKML, RT

On Tue, 2007-06-19 at 13:57 -0700, Daniel Walker wrote:

> Looks like you have a whitespace issue here.. Should be tabs, not
> spaces.


Bah, there's a "/* -*- linux-c -*- " at the top of that file that's
messing up with my emacs!

Is this better :-p

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

Index: linux-2.6.21.5-rt15/drivers/char/sysrq.c
===================================================================
--- linux-2.6.21.5-rt15.orig/drivers/char/sysrq.c
+++ linux-2.6.21.5-rt15/drivers/char/sysrq.c
@@ -213,7 +213,9 @@ static struct sysrq_key_op sysrq_showreg
 
 static void sysrq_handle_showallregs(int key, struct tty_struct *tty)
 {
+	preempt_disable();
 	nmi_show_all_regs();
+	preempt_enable();
 }
 
 static struct sysrq_key_op sysrq_showallregs_op = {



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

end of thread, other threads:[~2007-06-19 21:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-19 20:17 [PATCH RT] disable preemption on running show all regs Steven Rostedt
2007-06-19 20:57 ` Daniel Walker
2007-06-19 21:36   ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox