[PATCH] Fix the spurious unlock_cpu_hotplug false warnings

Cpu-hotplug locking has a minor race case caused because of setting the
variable "recursive" to NULL *after* releasing the cpu_bitmask_lock in the
function unlock_cpu_hotplug,instead of doing so before releasing the
cpu_bitmask_lock.

This was the cause of most of the recent false spurious lock_cpu_unlock
warnings.

This should fix the problem reported by Martin Lorenz reported in
http://lkml.org/lkml/2006/10/29/127.

Thanks to Srinivasa DS for pointing it out.

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by Gautham R Shenoy and committed by Linus Torvalds 4b96b1a1 d1ed6a3e

+1 -1
+1 -1
kernel/cpu.c
··· 58 recursive_depth--; 59 return; 60 } 61 - mutex_unlock(&cpu_bitmask_lock); 62 recursive = NULL; 63 } 64 EXPORT_SYMBOL_GPL(unlock_cpu_hotplug); 65
··· 58 recursive_depth--; 59 return; 60 } 61 recursive = NULL; 62 + mutex_unlock(&cpu_bitmask_lock); 63 } 64 EXPORT_SYMBOL_GPL(unlock_cpu_hotplug); 65