X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=kernel%2Fcpu.c;h=42bd331ee0abff1d542583e14beb20d91f6fae62;hb=d1c7d97ad58836affde6e39980b96527510b572e;hp=f560598807c150dd3b919e2688a78865e0b6f4df;hpb=e665faa424a4a782aa986274920c1fc5b76f5560;p=cascardo%2Flinux.git diff --git a/kernel/cpu.c b/kernel/cpu.c index f560598807c1..42bd331ee0ab 100644 --- a/kernel/cpu.c +++ b/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);