Patch "sched/wait: Fix add_wait_queue() behavioral change" has been added to the 4.14-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
sched/wait: Fix add_wait_queue() behavioral change
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
sched-wait-fix-add_wait_queue-behavioral-change.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
c6b9d9a33029014446bd9ed84c1688f6d3d4eab9Mon Sep 17 00:00:00 2001
From: Omar Sandoval <[email protected]>
Date: Tue, 5 Dec 2017 23:15:31 -0800
Subject: sched/wait: Fix add_wait_queue() behavioral change
From: Omar Sandoval <[email protected]>
commit c6b9d9a33029014446bd9ed84c1688f6d3d4eab9 upstream.
The following cleanup commit:
50816c48997a ("sched/wait: Standardize internal naming of wait-queue entries")
... unintentionally changed the behavior of add_wait_queue() from inserting the wait entry at the head of the wait queue to the tail of the wait queue.
Beyond a negative performance impact this change in behavior theoretically also breaks wait queues which mix exclusive and non-exclusive waiters, as non-exclusive waiters will not be woken up if they are queued behind enough exclusive waiters.
--- kernel/sched/wait.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/wait.c +1 -1
@@ -27,7 +27,7 @@ void add_wait_queue(struct wait_queue_he wq_entry->flags &= ~WQ_FLAG_EXCLUSIVE ;spin_lock_irqsave (&wq_head->lock, flags); -__add_wait_queue_entry_tail (wq_head, wq_entry); +__add_wait_queue (wq_head, wq_entry);spin_unlock_irqrestore (&wq_head->lock, flags); }EXPORT_SYMBOL (add_wait_queue);
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/sched-wait-fix-add_wait_queue-behavioral-change.patch