Pull futex fix from Ingo Molnar: - Fix race in futex_pivot_pending() during private hash resize that can cause stuck tasks (Yao Kai) * tag 'locking-urgent-2026-08-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: futex: Fix race in futex_pivot_pending() during private hash resize
Unified · Split
| @@ -1783,14 +1783,15 @@ void futex_hash_free(struct mm_struct *mm) · 1782 unmodified lines | ||
| 1783 | 1783 | |
| 1784 | 1784 | static bool futex_pivot_pending(struct mm_struct *mm) |
| 1785 | 1785 | { |
| 1786 | + struct futex_mm_phash *mmph = &mm->futex.phash; | |
| 1786 | 1787 | struct futex_private_hash *fph; |
| 1787 | 1788 | |
| 1788 | − guard(rcu)(); | |
| 1789 | + guard(mutex)(&mmph->lock); | |
| 1789 | 1790 | |
| 1790 | − if (!mm->futex.phash.hash_new) | |
| 1791 | + if (!mmph->hash_new) | |
| 1791 | 1792 | return true; |
| 1792 | 1793 | |
| 1793 | − fph = rcu_dereference(mm->futex.phash.hash); | |
| 1794 | + fph = rcu_dereference_raw(mmph->hash); | |
| 1794 | 1795 | return futex_ref_is_dead(fph); |
| 1795 | 1796 | } |
| 1796 | 1797 | |