summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-06-29 18:09:13 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2025-06-29 18:09:13 +0300
commit753a0f61b9091536425d656c145881b70eb402f7 (patch)
tree2320f3a84e29aa90311dd4f5a6db18ecf78cd950 /include/linux
parentdfba48a70cb68888efb494c9642502efe73614ed (diff)
parenta24cc6ce1933eade12aa2b9859de0fcd2dac2c06 (diff)
downloadlinux-753a0f61b9091536425d656c145881b70eb402f7.tar.xz
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().
Diffstat (limited to 'include/linux')
-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);
}