Pull locking fixes from Thomas Gleixner: "A small series of fixes which all address possible missed wakeups: - Document and fix the wakeup ordering of wake_q - Add the missing barrier in rcuwait_wake_up(), which was documented in the comment but missing in the code - Fix the possible missed wakeups in the rwsem and futex code" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/rwsem: Fix (possible) missed wakeup futex: Fix (possible) missed wakeup sched/wake_q: Fix wakeup ordering for wake_q sched/wake_q: Document wake_q_add() sched/wait: Fix rcuwait_wake_up() ordering
Showing the changes to include/linux (1 of 5 files). Show all
Unified · Split
| @@ -24,9 +24,13 @@ · 23 unmodified lines | ||
| 24 | 24 | * called near the end of a function. Otherwise, the list can be |
| 25 | 25 | * re-initialized for later re-use by wake_q_init(). |
| 26 | 26 | * |
| 27 | − * Note that this can cause spurious wakeups. schedule() callers | |
| 27 | + * NOTE that this can cause spurious wakeups. schedule() callers | |
| 28 | 28 | * must ensure the call is done inside a loop, confirming that the |
| 29 | 29 | * wakeup condition has in fact occurred. |
| 30 | + * | |
| 31 | + * NOTE that there is no guarantee the wakeup will happen any later than the | |
| 32 | + * wake_q_add() location. Therefore task must be ready to be woken at the | |
| 33 | + * location of the wake_q_add(). | |
| 30 | 34 | */ |
| 31 | 35 | |
| 32 | 36 | #include <linux/sched.h> |