Commit 5a4ccaf37ffece09ef33f1cfec67efa8ee56f967
Committed by
Len Brown
1 parent
33f1d7ecc6
Exists in
master
and in
4 other branches
kprobes: check CONFIG_FREEZER instead of CONFIG_PM
Check CONFIG_FREEZER instead of CONFIG_PM because kprobe booster depends on freeze_processes() and thaw_processes() when CONFIG_PREEMPT=y. This fixes a linkage error which occurs when CONFIG_PREEMPT=y, CONFIG_PM=y and CONFIG_FREEZER=n. Reported-by: Cheng Renquan <crquan@gmail.com> Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Len Brown <len.brown@intel.com>
Showing 3 changed files with 3 additions and 3 deletions Side-by-side Diff
arch/ia64/kernel/kprobes.c
... | ... | @@ -870,7 +870,7 @@ |
870 | 870 | return 1; |
871 | 871 | |
872 | 872 | ss_probe: |
873 | -#if !defined(CONFIG_PREEMPT) || defined(CONFIG_PM) | |
873 | +#if !defined(CONFIG_PREEMPT) || defined(CONFIG_FREEZER) | |
874 | 874 | if (p->ainsn.inst_flag == INST_FLAG_BOOSTABLE && !p->post_handler) { |
875 | 875 | /* Boost up -- we can execute copied instructions directly */ |
876 | 876 | ia64_psr(regs)->ri = p->ainsn.slot; |
arch/x86/kernel/kprobes.c
... | ... | @@ -446,7 +446,7 @@ |
446 | 446 | static void __kprobes setup_singlestep(struct kprobe *p, struct pt_regs *regs, |
447 | 447 | struct kprobe_ctlblk *kcb) |
448 | 448 | { |
449 | -#if !defined(CONFIG_PREEMPT) || defined(CONFIG_PM) | |
449 | +#if !defined(CONFIG_PREEMPT) || defined(CONFIG_FREEZER) | |
450 | 450 | if (p->ainsn.boostable == 1 && !p->post_handler) { |
451 | 451 | /* Boost up -- we can execute copied instructions directly */ |
452 | 452 | reset_current_kprobe(); |
kernel/kprobes.c
... | ... | @@ -123,7 +123,7 @@ |
123 | 123 | static int __kprobes check_safety(void) |
124 | 124 | { |
125 | 125 | int ret = 0; |
126 | -#if defined(CONFIG_PREEMPT) && defined(CONFIG_PM) | |
126 | +#if defined(CONFIG_PREEMPT) && defined(CONFIG_FREEZER) | |
127 | 127 | ret = freeze_processes(); |
128 | 128 | if (ret == 0) { |
129 | 129 | struct task_struct *p, *q; |