diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/kprobes.c | 13 |
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); |