[PATCH v3 0/2] futex: Address two futex-requeue-pi issues

Sebastian Andrzej Siewior posted 2 patches 1 month ago
There is a newer version of this series
kernel/futex/requeue.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
[PATCH v3 0/2] futex: Address two futex-requeue-pi issues
Posted by Sebastian Andrzej Siewior 1 month ago
This is an update to Yao Kai initial series. I polished the commit
description and bit and update the comment in #2.

#1 Was simply missed in the initial commit and never noticed.
#2 Requires extreme precise timing to reproduce.

v2…v3: https://lore.kernel.org/20260722085140.1949077-1-yaokai34@huawei.com
 - Update commit message for both patches.
 - Drop the comment from #1. The whole thing has nothing to do with
   skipped schedule(). The only problem is that that rt_mutex_schedule()
   requires a rt_mutex_.*_schedule() invocation before rtmutex is about
   to be acquired. In case it went unnoticed for so long because that
   rt_mutex is usually not contended.
 - Update the comment in #2 to describe the race and why the wake is
   skipped.

v1…v2: (Yao Kai) https://lore.kernel.org/20260722085140.1949077-1-yaokai34@huawei.com
 - Replace the scheduler helper split in patch 1 with
   rt_mutex_pre_schedule()/rt_mutex_post_schedule() directly around
   rt_mutex_wait_proxy_lock().
 - Expand patch 2's comment and changelog to explain why the saved-task
   wakeup covers rcuwait without losing a wakeup.

Yao Kai (2):
  futex: Add missing rt_mutex_.*_schedule() around
    rt_mutex_wait_proxy_lock()
  futex: Prevent rcuwait use-after-free during requeue PI

 kernel/futex/requeue.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

Sebastian