diff options
Diffstat (limited to 'kernel/kprobes.c')
-rw-r--r-- | kernel/kprobes.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 1e0250cb9486..1485ca8d0e00 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c | |||
@@ -79,7 +79,7 @@ static DEFINE_PER_CPU(struct kprobe *, kprobe_instance) = NULL; | |||
79 | * | 79 | * |
80 | * For such cases, we now have a blacklist | 80 | * For such cases, we now have a blacklist |
81 | */ | 81 | */ |
82 | struct kprobe_blackpoint kprobe_blacklist[] = { | 82 | static struct kprobe_blackpoint kprobe_blacklist[] = { |
83 | {"preempt_schedule",}, | 83 | {"preempt_schedule",}, |
84 | {NULL} /* Terminator */ | 84 | {NULL} /* Terminator */ |
85 | }; | 85 | }; |
@@ -699,8 +699,9 @@ static int __register_kprobes(struct kprobe **kps, int num, | |||
699 | return -EINVAL; | 699 | return -EINVAL; |
700 | for (i = 0; i < num; i++) { | 700 | for (i = 0; i < num; i++) { |
701 | ret = __register_kprobe(kps[i], called_from); | 701 | ret = __register_kprobe(kps[i], called_from); |
702 | if (ret < 0 && i > 0) { | 702 | if (ret < 0) { |
703 | unregister_kprobes(kps, i); | 703 | if (i > 0) |
704 | unregister_kprobes(kps, i); | ||
704 | break; | 705 | break; |
705 | } | 706 | } |
706 | } | 707 | } |
@@ -776,8 +777,9 @@ static int __register_jprobes(struct jprobe **jps, int num, | |||
776 | jp->kp.break_handler = longjmp_break_handler; | 777 | jp->kp.break_handler = longjmp_break_handler; |
777 | ret = __register_kprobe(&jp->kp, called_from); | 778 | ret = __register_kprobe(&jp->kp, called_from); |
778 | } | 779 | } |
779 | if (ret < 0 && i > 0) { | 780 | if (ret < 0) { |
780 | unregister_jprobes(jps, i); | 781 | if (i > 0) |
782 | unregister_jprobes(jps, i); | ||
781 | break; | 783 | break; |
782 | } | 784 | } |
783 | } | 785 | } |
@@ -920,8 +922,9 @@ static int __register_kretprobes(struct kretprobe **rps, int num, | |||
920 | return -EINVAL; | 922 | return -EINVAL; |
921 | for (i = 0; i < num; i++) { | 923 | for (i = 0; i < num; i++) { |
922 | ret = __register_kretprobe(rps[i], called_from); | 924 | ret = __register_kretprobe(rps[i], called_from); |
923 | if (ret < 0 && i > 0) { | 925 | if (ret < 0) { |
924 | unregister_kretprobes(rps, i); | 926 | if (i > 0) |
927 | unregister_kretprobes(rps, i); | ||
925 | break; | 928 | break; |
926 | } | 929 | } |
927 | } | 930 | } |