Commit 4b96b1a1 authored by Gautham R Shenoy's avatar Gautham R Shenoy Committed by Linus Torvalds

[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: default avatarGautham R Shenoy <ego@in.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d1ed6a3e
...@@ -58,8 +58,8 @@ void unlock_cpu_hotplug(void) ...@@ -58,8 +58,8 @@ void unlock_cpu_hotplug(void)
recursive_depth--; recursive_depth--;
return; return;
} }
mutex_unlock(&cpu_bitmask_lock);
recursive = NULL; recursive = NULL;
mutex_unlock(&cpu_bitmask_lock);
} }
EXPORT_SYMBOL_GPL(unlock_cpu_hotplug); EXPORT_SYMBOL_GPL(unlock_cpu_hotplug);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment