]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
kprobes: check CONFIG_FREEZER instead of CONFIG_PM
authorMasami Hiramatsu <mhiramat@redhat.com>
Tue, 6 Jan 2009 20:15:32 +0000 (21:15 +0100)
committerLen Brown <len.brown@intel.com>
Fri, 16 Jan 2009 19:32:17 +0000 (14:32 -0500)
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>
arch/ia64/kernel/kprobes.c
arch/x86/kernel/kprobes.c
kernel/kprobes.c

index f90be51b1123fe12199da46e019c5c20f0b2b371..9adac441ac9bb1f4400a6620951d7e07bbdcdfbe 100644 (file)
@@ -870,7 +870,7 @@ static int __kprobes pre_kprobes_handler(struct die_args *args)
                return 1;
 
 ss_probe:
-#if !defined(CONFIG_PREEMPT) || defined(CONFIG_PM)
+#if !defined(CONFIG_PREEMPT) || defined(CONFIG_FREEZER)
        if (p->ainsn.inst_flag == INST_FLAG_BOOSTABLE && !p->post_handler) {
                /* Boost up -- we can execute copied instructions directly */
                ia64_psr(regs)->ri = p->ainsn.slot;
index 884d985b8b8223a0df4c566b29ed0d47204e8453..e948b28a5a9ab47a1f0d91d78ec7039f315830bd 100644 (file)
@@ -446,7 +446,7 @@ void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri,
 static void __kprobes setup_singlestep(struct kprobe *p, struct pt_regs *regs,
                                       struct kprobe_ctlblk *kcb)
 {
-#if !defined(CONFIG_PREEMPT) || defined(CONFIG_PM)
+#if !defined(CONFIG_PREEMPT) || defined(CONFIG_FREEZER)
        if (p->ainsn.boostable == 1 && !p->post_handler) {
                /* Boost up -- we can execute copied instructions directly */
                reset_current_kprobe();
index 1b9cbdc0127ad5416aed125ad875badae744d8f8..7ba8cd9845cbe90aee7b1c54711633ad827e24ca 100644 (file)
@@ -123,7 +123,7 @@ static int collect_garbage_slots(void);
 static int __kprobes check_safety(void)
 {
        int ret = 0;
-#if defined(CONFIG_PREEMPT) && defined(CONFIG_PM)
+#if defined(CONFIG_PREEMPT) && defined(CONFIG_FREEZER)
        ret = freeze_processes();
        if (ret == 0) {
                struct task_struct *p, *q;