aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKeshavamurthy Anil S <anil.s.keshavamurthy@intel.com>2005-09-06 18:19:35 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-07 19:58:01 -0400
commitdeac66ae454cacf942c051b86d9232af546fb187 (patch)
tree17a72e7a2dcf2d1a93a6afdef661f290b1888f1c /include
parentbce0649417d6e71f6df8ab7b11103d247913b142 (diff)
[PATCH] kprobes: fix bug when probed on task and isr functions
This patch fixes a race condition where in system used to hang or sometime crash within minutes when kprobes are inserted on ISR routine and a task routine. The fix has been stress tested on i386, ia64, pp64 and on x86_64. To reproduce the problem insert kprobes on schedule() and do_IRQ() functions and you should see hang or system crash. Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Acked-by: Prasanna S Panchamukhi <prasanna@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-ia64/kprobes.h1
-rw-r--r--include/asm-ppc64/kprobes.h3
2 files changed, 4 insertions, 0 deletions
diff --git a/include/asm-ia64/kprobes.h b/include/asm-ia64/kprobes.h
index bf36a32e37e..573a3574a24 100644
--- a/include/asm-ia64/kprobes.h
+++ b/include/asm-ia64/kprobes.h
@@ -92,6 +92,7 @@ struct arch_specific_insn {
92 kprobe_opcode_t insn; 92 kprobe_opcode_t insn;
93 #define INST_FLAG_FIX_RELATIVE_IP_ADDR 1 93 #define INST_FLAG_FIX_RELATIVE_IP_ADDR 1
94 #define INST_FLAG_FIX_BRANCH_REG 2 94 #define INST_FLAG_FIX_BRANCH_REG 2
95 #define INST_FLAG_BREAK_INST 4
95 unsigned long inst_flag; 96 unsigned long inst_flag;
96 unsigned short target_br_reg; 97 unsigned short target_br_reg;
97}; 98};
diff --git a/include/asm-ppc64/kprobes.h b/include/asm-ppc64/kprobes.h
index 0802919c323..d9129d2b038 100644
--- a/include/asm-ppc64/kprobes.h
+++ b/include/asm-ppc64/kprobes.h
@@ -42,6 +42,9 @@ typedef unsigned int kprobe_opcode_t;
42 42
43#define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)((func_descr_t *)pentry) 43#define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)((func_descr_t *)pentry)
44 44
45#define is_trap(instr) (IS_TW(instr) || IS_TD(instr) || \
46 IS_TWI(instr) || IS_TDI(instr))
47
45#define ARCH_SUPPORTS_KRETPROBES 48#define ARCH_SUPPORTS_KRETPROBES
46void kretprobe_trampoline(void); 49void kretprobe_trampoline(void);
47 50