aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-06-29 08:09:13 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2025-06-29 08:09:13 -0700
commit753a0f61b9091536425d656c145881b70eb402f7 (patch)
tree2320f3a84e29aa90311dd4f5a6db18ecf78cd950
parentMerge tag 'i2c-for-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff)
parentfutex: Initialize futex_phash_new during fork(). (diff)
downloadlinux-753a0f61b9091536425d656c145881b70eb402f7.tar.gz
linux-753a0f61b9091536425d656c145881b70eb402f7.zip
Merge tag 'locking_urgent_for_v6.16_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull locking fix from Borislav Petkov: - Make sure the new futex phash is not copied during fork in order to avoid a double-free * tag 'locking_urgent_for_v6.16_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: futex: Initialize futex_phash_new during fork().
-rw-r--r--include/linux/futex.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/futex.h b/include/linux/futex.h
index 005b040c4791..b37193653e6b 100644
--- a/include/linux/futex.h
+++ b/include/linux/futex.h
@@ -89,6 +89,7 @@ void futex_hash_free(struct mm_struct *mm);
static inline void futex_mm_init(struct mm_struct *mm)
{
RCU_INIT_POINTER(mm->futex_phash, NULL);
+ mm->futex_phash_new = NULL;
mutex_init(&mm->futex_hash_lock);
}