public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] avr32: Fixup kprobes preemption handling.
@ 2006-12-01  7:50 Paul Mundt
  2006-12-01  7:53 ` Paul Mundt
  2006-12-01 12:59 ` Haavard Skinnemoen
  0 siblings, 2 replies; 3+ messages in thread
From: Paul Mundt @ 2006-12-01  7:50 UTC (permalink / raw)
  To: Haavard Skinnemoen; +Cc: linux-kernel

While working on SH kprobes, I noticed that avr32 got the preemption
handling wrong in the no probe case. The idea is that upon entry of
kprobe_handler() preemption is disabled outright across the life of the
kprobe, only to be re-enabled in post_kprobe_handler().

However, in the event that the probe is never activated, there's never
any chance of hitting the post probe handler, which allows for the
current avr32 implementation to disable preemption indefinitely, as it's
currently missing a re-enable when no probe is activated.

Patch follows.

--

diff --git a/arch/avr32/kernel/kprobes.c b/arch/avr32/kernel/kprobes.c
index ca41fc1..d0abbca 100644
--- a/arch/avr32/kernel/kprobes.c
+++ b/arch/avr32/kernel/kprobes.c
@@ -154,6 +154,7 @@ ss_probe:
 	return 1;
 
 no_kprobe:
+	preempt_enable_no_resched();
 	return ret;
 }

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

end of thread, other threads:[~2006-12-01 13:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-01  7:50 [PATCH] avr32: Fixup kprobes preemption handling Paul Mundt
2006-12-01  7:53 ` Paul Mundt
2006-12-01 12:59 ` Haavard Skinnemoen

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