Skip to content

Commit

Permalink
[PATCH] avr32: fixup kprobes preemption handling
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Paul Mundt authored and Linus Torvalds committed Dec 7, 2006
1 parent e9c1528 commit 4d3eeea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/avr32/kernel/kprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
return 1;

no_kprobe:
preempt_enable_no_resched();
return ret;
}

Expand Down

0 comments on commit 4d3eeea

Please sign in to comment.