Skip to content

Commit

Permalink
Merge tag 'locking_urgent_for_v5.16_rc6' of git://git.kernel.org/pub/…
Browse files Browse the repository at this point in the history
…scm/linux/kernel/git/tip/tip

Pull locking fix from Borislav Petkov:

 - Fix the rtmutex condition checking when the optimistic spinning of a
   waiter needs to be terminated

* tag 'locking_urgent_for_v5.16_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  locking/rtmutex: Fix incorrect condition in rtmutex_spin_on_owner()
  • Loading branch information
Linus Torvalds committed Dec 19, 2021
2 parents c36d891 + 8f556a3 commit 909e1d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/locking/rtmutex.c
Original file line number Diff line number Diff line change
Expand Up @@ -1380,7 +1380,7 @@ static bool rtmutex_spin_on_owner(struct rt_mutex_base *lock,
* - the VCPU on which owner runs is preempted
*/
if (!owner->on_cpu || need_resched() ||
rt_mutex_waiter_is_top_waiter(lock, waiter) ||
!rt_mutex_waiter_is_top_waiter(lock, waiter) ||
vcpu_is_preempted(task_cpu(owner))) {
res = false;
break;
Expand Down

0 comments on commit 909e1d1

Please sign in to comment.