summaryrefslogtreecommitdiff
path: root/kernel/locking/rtmutex_common.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2017-03-23 15:56:13 +0100
committerThomas Gleixner <tglx@linutronix.de>2017-04-04 11:44:06 +0200
commite0aad5b44ff5d28ac1d6ae70cdf84ca228e889dc (patch)
tree5e15c53d3b2fa6096e14073a3f0140ca81aeeda4 /kernel/locking/rtmutex_common.h
parentb91473ff6e979c0028f02f90e40c844959c736d8 (diff)
downloadlinux-e0aad5b44ff5d28ac1d6ae70cdf84ca228e889dc.tar.gz
rtmutex: Fix PI chain order integrity
rt_mutex_waiter::prio is a copy of task_struct::prio which is updated during the PI chain walk, such that the PI chain order isn't messed up by (asynchronous) task state updates. Currently rt_mutex_waiter_less() uses task state for deadline tasks; this is broken, since the task state can, as said above, change asynchronously, causing the RB tree order to change without actual tree update -> FAIL. Fix this by also copying the deadline into the rt_mutex_waiter state and updating it along with its prio field. Ideally we would also force PI chain updates whenever DL tasks update their deadline parameter, but for first approximation this is less broken than it was. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: juri.lelli@arm.com Cc: bigeasy@linutronix.de Cc: xlpang@redhat.com Cc: rostedt@goodmis.org Cc: mathieu.desnoyers@efficios.com Cc: jdesfossez@efficios.com Cc: bristot@redhat.com Link: http://lkml.kernel.org/r/20170323150216.403992539@infradead.org Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/locking/rtmutex_common.h')
-rw-r--r--kernel/locking/rtmutex_common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/locking/rtmutex_common.h b/kernel/locking/rtmutex_common.h
index 9e36aeddce18..72ad45a9a794 100644
--- a/kernel/locking/rtmutex_common.h
+++ b/kernel/locking/rtmutex_common.h
@@ -34,6 +34,7 @@ struct rt_mutex_waiter {
struct rt_mutex *deadlock_lock;
#endif
int prio;
+ u64 deadline;
};
/*