diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2014-10-30 15:52:34 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2014-10-30 15:52:34 -0400 |
commit | d998a5df1d48dc4df6b44a2b5051aacecf76186a (patch) | |
tree | 4945ed7947817ca668dcd1ab33a3bf8afbcbe2f2 | |
parent | dc3bf71a218edd95e0e25839249ef6e0ed6b7bcf (diff) |
rtmutex: Fix up failed merge update
The -rt patch replaced the wake_up_prcocess() in rtmutex.c with
rt_mutex_wake_waiter(). When merging 3.10.49, I did not remove
the wake_up_process() and left it there after the rt_mutex_wake_waiter().
This passed the tests, but is not correct. There's a tight race where
a task sets its state to TASK_UNINTERRUPTIBLE and grabs a spin_lock
that was converted into an rtmutex in -rt. The rtmutex must keep the
tasks state otherwise it fail to schedule after releasing the spin lock
and calling schedule.
In most cases, this will not cause any harm, but there's a 1 in a million
chance that it will. The tests survived because it's hard to hit this
bug.
As I didn't catch this after I pushed the changes to kernel.org, I'm
making this fix now as a separate -rt release.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | kernel/rtmutex.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c index 5f17f55c562d..2671e5532534 100644 --- a/kernel/rtmutex.c +++ b/kernel/rtmutex.c @@ -699,7 +699,6 @@ static void wakeup_next_waiter(struct rt_mutex *lock) * acquire it in order to dequeue the waiter. */ rt_mutex_wake_waiter(waiter); - wake_up_process(waiter->task); } /* |