* [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
* Re: [PATCH] avr32: Fixup kprobes preemption handling.
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
1 sibling, 0 replies; 3+ messages in thread
From: Paul Mundt @ 2006-12-01 7:53 UTC (permalink / raw)
To: Haavard Skinnemoen; +Cc: linux-kernel
On Fri, Dec 01, 2006 at 04:50:50PM +0900, Paul Mundt wrote:
> 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.
>
And that's of course..
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] avr32: Fixup kprobes preemption handling.
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
1 sibling, 0 replies; 3+ messages in thread
From: Haavard Skinnemoen @ 2006-12-01 12:59 UTC (permalink / raw)
To: Paul Mundt; +Cc: linux-kernel
On Fri, 1 Dec 2006 16:50:50 +0900
Paul Mundt <lethal@linux-sh.org> wrote:
> 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.
You're absolutely right. Thanks for the patch, I've added it to my tree.
Håvard
^ permalink raw reply [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