diff options
| author | Thomas Weißschuh <linux@weissschuh.net> | 2026-05-04 07:14:58 +0200 |
|---|---|---|
| committer | Thomas Weißschuh <linux@weissschuh.net> | 2026-05-04 08:46:43 +0200 |
| commit | bb2d82d41894cb30d836e9796ff67d2f9a71eccf (patch) | |
| tree | 4085a924beaa877dc68346c4baf7f4481fc9f871 /kernel/fork.c | |
| parent | d4fe68aea3d9fa66534dc2485b8ab998514ca0fc (diff) | |
| parent | 7fd2df204f342fc17d1a0bfcd474b24232fb0f32 (diff) | |
Merge tag 'v7.1-rc2' into nolibc/for-next
Pick up commit b0aa5e4b087b ("sh: Fix fallout from ZERO_PAGE
consolidation") to fix the sh4 selftests.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Diffstat (limited to 'kernel/fork.c')
| -rw-r--r-- | kernel/fork.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index f1ad69c6dc2d..5f3fdfdb14c7 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -1951,9 +1951,11 @@ static void rv_task_fork(struct task_struct *p) static bool need_futex_hash_allocate_default(u64 clone_flags) { - if ((clone_flags & (CLONE_THREAD | CLONE_VM)) != (CLONE_THREAD | CLONE_VM)) - return false; - return true; + /* + * Allocate a default futex hash for any sibling that will + * share the parent's mm, except vfork. + */ + return (clone_flags & (CLONE_VM | CLONE_VFORK)) == CLONE_VM; } /* @@ -2380,10 +2382,6 @@ __latent_entropy struct task_struct *copy_process( if (retval) goto bad_fork_cancel_cgroup; - /* - * Allocate a default futex hash for the user process once the first - * thread spawns. - */ if (need_futex_hash_allocate_default(clone_flags)) { retval = futex_hash_allocate_default(); if (retval) |
