aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/kprobes.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2010-09-14 21:04:26 -0400
committerIngo Molnar <mingo@elte.hu>2010-09-15 04:44:00 -0400
commitedbaadbe42b0b790618ec49d29626223529d8195 (patch)
treefbd036fe6208249b40ab56f1e68c4efb5b7785d0 /kernel/kprobes.c
parent38a81da2205f94e8a2a834b51a6b99c91fc7c2e8 (diff)
kprobes: Remove redundant address check
Remove call to kernel_text_address() in register_jprobes() because it is called right after in register_kprobe(). Signed-off-by: Namhyung Kim <namhyung@gmail.com> Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> LKML-Reference: <1284512670-2369-2-git-send-email-namhyung@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/kprobes.c')
-rw-r--r--kernel/kprobes.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 282035f3ae96..8f967016cef0 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -1343,14 +1343,11 @@ int __kprobes register_jprobes(struct jprobe **jps, int num)
1343 jp = jps[i]; 1343 jp = jps[i];
1344 addr = arch_deref_entry_point(jp->entry); 1344 addr = arch_deref_entry_point(jp->entry);
1345 1345
1346 if (!kernel_text_address(addr)) 1346 /* Todo: Verify probepoint is a function entry point */
1347 ret = -EINVAL; 1347 jp->kp.pre_handler = setjmp_pre_handler;
1348 else { 1348 jp->kp.break_handler = longjmp_break_handler;
1349 /* Todo: Verify probepoint is a function entry point */ 1349 ret = register_kprobe(&jp->kp);
1350 jp->kp.pre_handler = setjmp_pre_handler; 1350
1351 jp->kp.break_handler = longjmp_break_handler;
1352 ret = register_kprobe(&jp->kp);
1353 }
1354 if (ret < 0) { 1351 if (ret < 0) {
1355 if (i > 0) 1352 if (i > 0)
1356 unregister_jprobes(jps, i); 1353 unregister_jprobes(jps, i);