kprobes: Remove redundant address check
authorNamhyung Kim <namhyung@gmail.com>
Wed, 15 Sep 2010 01:04:26 +0000 (10:04 +0900)
committerIngo Molnar <mingo@elte.hu>
Wed, 15 Sep 2010 08:44:00 +0000 (10:44 +0200)
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>
kernel/kprobes.c

index 282035f3ae964e1e288f352c370be8edd11d3078..8f967016cef06dbe66126b3759c257d58d2eb145 100644 (file)
@@ -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);