From f9eec0644de47705dd0fffb0a656117659296ee3 Mon Sep 17 00:00:00 2001 From: "Srivatsa S. Bhat" Date: Mon, 8 Oct 2012 16:28:20 -0700 Subject: [PATCH] --- yaml --- r: 332333 b: refs/heads/master c: 075663d19885eb3738fd2d7dbdb8947e12563b68 h: refs/heads/master i: 332331: 937a315a4bd3e6316c5ea100763bec99c2a07a39 v: v3 --- [refs] | 2 +- trunk/kernel/cpu.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 6911ea5b6611..19d06bc3eaa9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7ac57a89de958fbb5271dc504d0c25e34dbeec32 +refs/heads/master: 075663d19885eb3738fd2d7dbdb8947e12563b68 diff --git a/trunk/kernel/cpu.c b/trunk/kernel/cpu.c index f560598807c1..42bd331ee0ab 100644 --- a/trunk/kernel/cpu.c +++ b/trunk/kernel/cpu.c @@ -80,6 +80,10 @@ void put_online_cpus(void) if (cpu_hotplug.active_writer == current) return; mutex_lock(&cpu_hotplug.lock); + + if (WARN_ON(!cpu_hotplug.refcount)) + cpu_hotplug.refcount++; /* try to fix things up */ + if (!--cpu_hotplug.refcount && unlikely(cpu_hotplug.active_writer)) wake_up_process(cpu_hotplug.active_writer); mutex_unlock(&cpu_hotplug.lock);