Commit:     e1d9fd2e3d33b2fec3207171ec8ca6e71d5c81c7
Parent:     ffaa82008f1aad52a6d3979f49d2a76c2928b60f
Author:     Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Sat Dec 23 16:55:29 2006 +0100
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sat Dec 23 13:59:33 2006 -0800

    [PATCH] suspend: fix suspend on single-CPU systems
    Clark Williams reported that suspend doesnt work on his laptop on
    2.6.20-rc1-rt kernels. The bug was introduced by the following cleanup
     commit 112cecb2cc0e7341db92281ba04b26c41bb8146d
     Author: Siddha, Suresh B <[EMAIL PROTECTED]>
     Date:   Wed Dec 6 20:34:31 2006 -0800
        [PATCH] suspend: don't change cpus_allowed for task initiating the 
    because with this change 'error' is not initialized to 0 anymore, if
    there are no other online CPUs. (i.e. if the system is single-CPU).
    the fix is the initialize it to 0. The really weird thing is that my
    version of gcc does not warn about this non-initialized variable
    situation ...
    (also fix the kernel printk in the error branch, it was missing a
    Reported-by: Clark Williams <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 kernel/cpu.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 9124669..241064a 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -258,7 +258,7 @@ static cpumask_t frozen_cpus;
 int disable_nonboot_cpus(void)
-       int cpu, first_cpu, error;
+       int cpu, first_cpu, error = 0;
        first_cpu = first_cpu(cpu_present_map);
@@ -294,7 +294,7 @@ int disable_nonboot_cpus(void)
                /* Make sure the CPUs won't be enabled by someone else */
                cpu_hotplug_disabled = 1;
        } else {
-               printk(KERN_ERR "Non-boot CPUs are not disabled");
+               printk(KERN_ERR "Non-boot CPUs are not disabled\n");
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to