diff options
author | Steven Rostedt <rostedt@goodmis.org> | 2012-03-01 13:55:30 -0500 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2012-03-24 10:27:27 -0500 |
commit | 422a447373c45b0599ceffe2bc5418281973263e (patch) | |
tree | c5e7ca7d0166c5675abbdfb19eaf5498584091d4 /net | |
parent | e74469df8110849584750db426deb9d3e7184f0c (diff) |
lglock/rt: Use non-rt for_each_cpu() in -rt code
Currently the RT version of the lglocks() does a for_each_online_cpu()
in the name##_global_lock_online() functions. Non-rt uses its own
mask for this, and for good reason.
A task may grab a *_global_lock_online(), and in the mean time, one
of the CPUs goes offline. Now when that task does a *_global_unlock_online()
it releases all the locks *except* the one that went offline.
Now if that CPU were to come back on line, its lock is now owned by a
task that never released it when it should have.
This causes all sorts of fun errors. Like owners of a lock no longer
existing, or sleeping on IO, waiting to be woken up by a task that
happens to be blocked on the lock it never released.
Convert the RT versions to use the lglock specific cpumasks. As once
a CPU comes on line, the mask is set, and never cleared even when the
CPU goes offline. The locks for that CPU will still be taken and released.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Carsten Emde <C.Emde@osadl.org>
Cc: John Kacur <jkacur@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Clark Williams <clark.williams@gmail.com>
Cc: stable-rt@vger.kernel.org
Link: http://lkml.kernel.org/r/20120301190345.374756214@goodmis.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions