All of lore.kernel.org
 help / color / mirror / Atom feed
* + copy_process-fixed-jump-logic-error.patch added to mm-nonmm-unstable branch
@ 2025-09-24 21:11 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-09-24 21:11 UTC (permalink / raw)
  To: mm-commits, oleg, kees, david, eadavis, akpm


The patch titled
     Subject: copy_process(): fix jump logic error
has been added to the -mm mm-nonmm-unstable branch.  Its filename is
     copy_process-fixed-jump-logic-error.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/copy_process-fixed-jump-logic-error.patch

This patch will later appear in the mm-nonmm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Edward Adam Davis <eadavis@qq.com>
Subject: copy_process(): fix jump logic error
Date: Wed, 24 Sep 2025 20:06:21 +0800

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.

Link: https://lkml.kernel.org/r/tencent_5E4F978D9525A58D97925ADDBADDB2193107@qq.com
Signed-off-by: Edward Adam Davis <eadavis@qq.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 kernel/fork.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/kernel/fork.c~copy_process-fixed-jump-logic-error
+++ a/kernel/fork.c
@@ -2296,7 +2296,7 @@ __latent_entropy struct task_struct *cop
 	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
_

Patches currently in -mm which might be from eadavis@qq.com are

copy_process-fixed-jump-logic-error.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-09-24 21:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-24 21:11 + copy_process-fixed-jump-logic-error.patch added to mm-nonmm-unstable branch Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.