mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Acked-by: Masami Hiramatsu <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
38a81da220
commit
edbaadbe42
1 changed files with 5 additions and 8 deletions
|
|
@ -1343,14 +1343,11 @@ int __kprobes register_jprobes(struct jprobe **jps, int num)
|
|||
jp = jps[i];
|
||||
addr = arch_deref_entry_point(jp->entry);
|
||||
|
||||
if (!kernel_text_address(addr))
|
||||
ret = -EINVAL;
|
||||
else {
|
||||
/* Todo: Verify probepoint is a function entry point */
|
||||
jp->kp.pre_handler = setjmp_pre_handler;
|
||||
jp->kp.break_handler = longjmp_break_handler;
|
||||
ret = register_kprobe(&jp->kp);
|
||||
}
|
||||
/* Todo: Verify probepoint is a function entry point */
|
||||
jp->kp.pre_handler = setjmp_pre_handler;
|
||||
jp->kp.break_handler = longjmp_break_handler;
|
||||
ret = register_kprobe(&jp->kp);
|
||||
|
||||
if (ret < 0) {
|
||||
if (i > 0)
|
||||
unregister_jprobes(jps, i);
|
||||
|
|
|
|||
Loading…
Reference in a new issue