diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/kprobes.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 230d9d599b5a..915c2ce474fd 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -2083,9 +2083,10 @@ static void kill_kprobe(struct kprobe *p) /* * The module is going away. We should disarm the kprobe which - * is using ftrace. + * is using ftrace, because ftrace framework is still available at + * MODULE_STATE_GOING notification. */ - if (kprobe_ftrace(p)) + if (kprobe_ftrace(p) && !kprobe_disabled(p) && !kprobes_all_disarmed) disarm_kprobe_ftrace(p); } |