linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH Next] copy_process(): Fixed jump logic error
@ 2025-09-24 12:06 Edward Adam Davis
  2025-09-24 12:29 ` David Hildenbrand
  2025-09-26 15:11 ` Vlastimil Babka
  0 siblings, 2 replies; 4+ messages in thread
From: Edward Adam Davis @ 2025-09-24 12:06 UTC (permalink / raw)
  To: kees
  Cc: mingo, peterz, juri.lelli, vincent.guittot, dietmar.eggemann,
	rostedt, bsegall, mgorman, vschneid, akpm, david,
	lorenzo.stoakes, Liam.Howlett, vbabka, rppt, surenb, mhocko,
	linux-mm, linux-kernel

After futex_hash_allocate_default() fails, the logic should jump to
bad_fork_cancel_cgroup, not bad_fork_core_free.

Jumping to bad_fork_core_free would cause a siglock imbalance.

Signed-off-by: Edward Adam Davis <eadavis@qq.com>
---
 kernel/fork.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/fork.c b/kernel/fork.c
index e9a7fb5c3e49..a0b8eeeb1d27 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -2349,7 +2349,7 @@ __latent_entropy struct task_struct *copy_process(
 	if (need_futex_hash_allocate_default(clone_flags)) {
 		retval = futex_hash_allocate_default();
 		if (retval)
-			goto bad_fork_core_free;
+			goto bad_fork_cancel_cgroup;
 		/*
 		 * If we fail beyond this point we don't free the allocated
 		 * futex hash map. We assume that another thread will be created
-- 
2.43.0




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-09-26 15:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-24 12:06 [PATCH Next] copy_process(): Fixed jump logic error Edward Adam Davis
2025-09-24 12:29 ` David Hildenbrand
2025-09-26 15:11 ` Vlastimil Babka
2025-09-26 15:21   ` Sebastian Andrzej Siewior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox