From: Florian Fainelli <florian.fainelli@broadcom.com>
To: stable@vger.kernel.org
Cc: Benjamin Berg <benjamin.berg@intel.com>,
Johannes Berg <johannes.berg@intel.com>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Richard Weinberger <richard@nod.at>,
Anton Ivanov <anton.ivanov@cambridgegreys.com>,
Johannes Berg <johannes@sipsolutions.net>,
Brendan Higgins <brendan.higgins@linux.dev>,
David Gow <david@davidgow.net>, Rae Moar <raemoar63@gmail.com>,
Kees Cook <kees@kernel.org>, Jens Axboe <axboe@kernel.dk>,
Al Viro <viro@zeniv.linux.org.uk>,
Tiwei Bie <tiwei.btw@antgroup.com>,
linux-um@lists.infradead.org (open list:USER-MODE LINUX (UML)),
linux-kernel@vger.kernel.org (open list),
linux-kselftest@vger.kernel.org (open list:KERNEL UNIT TESTING
FRAMEWORK (KUnit)),
kunit-dev@googlegroups.com (open list:KERNEL UNIT TESTING
FRAMEWORK (KUnit)),
bcm-kernel-feedback-list@broadcom.com
Subject: [PATCH stable 6.12 6/9] um: Set parent death signal for userspace process
Date: Fri, 24 Jul 2026 14:41:16 -0700 [thread overview]
Message-ID: <20260724214119.1066665-7-florian.fainelli@broadcom.com> (raw)
In-Reply-To: <20260724214119.1066665-1-florian.fainelli@broadcom.com>
From: Benjamin Berg <benjamin.berg@intel.com>
commit 801e00d3a1b78b7f71675fae79946ff4aa3ee070 upstream
Enable PR_SET_PDEATHSIG so that the UML userspace process will be killed
when the kernel exits unexpectedly.
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Link: https://patch.msgid.link/20240919124511.282088-4-benjamin@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
[florian: upstream applies os_set_pdeathsig() in stub_exe.c, a file
introduced in v6.13 that does not exist in 6.12; applied instead to
userspace_tramp() in arch/um/os-Linux/skas/process.c, which is the
equivalent entry-point for the userspace process in 6.12]
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
arch/um/os-Linux/skas/process.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
index b6f656bcffb1..cca016b0b29b 100644
--- a/arch/um/os-Linux/skas/process.c
+++ b/arch/um/os-Linux/skas/process.c
@@ -214,6 +214,9 @@ static int userspace_tramp(void *stack)
(unsigned long) stub_segv_handler -
(unsigned long) __syscall_stub_start;
+ /* Make sure this process dies if the kernel dies */
+ os_set_pdeathsig();
+
ptrace(PTRACE_TRACEME, 0, 0, 0);
signal(SIGTERM, SIG_DFL);
--
2.34.1
next prev parent reply other threads:[~2026-07-24 21:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 21:41 [PATCH stable 6.12 0/9] Kunit backports for older systems Florian Fainelli
2026-07-24 21:41 ` [PATCH stable 6.12 1/9] um: Add os_set_pdeathsig helper function Florian Fainelli
2026-07-24 21:41 ` [PATCH stable 6.12 2/9] um: Set parent death signal for winch thread/process Florian Fainelli
2026-07-24 21:41 ` [PATCH stable 6.12 3/9] um: Use os_set_pdeathsig helper in " Florian Fainelli
2026-07-24 21:41 ` [PATCH stable 6.12 4/9] um: Set parent-death signal for ubd io thread/process Florian Fainelli
2026-07-24 21:41 ` [PATCH stable 6.12 5/9] um: Set parent-death signal for write_sigio thread/process Florian Fainelli
2026-07-24 21:41 ` Florian Fainelli [this message]
2026-07-24 21:41 ` [PATCH stable 6.12 7/9] kunit: tool: Terminate kernel under test on SIGINT Florian Fainelli
2026-07-24 21:41 ` [PATCH stable 6.12 8/9] kunit: tool: skip stty when stdin is not a tty Florian Fainelli
2026-07-24 21:41 ` [PATCH stable 6.12 9/9] um: Preserve errno within signal handler Florian Fainelli
2026-07-30 12:38 ` [PATCH stable 6.12 0/9] Kunit backports for older systems Greg KH
2026-07-30 16:07 ` Florian Fainelli
2026-07-31 2:39 ` Sasha Levin
2026-07-31 23:16 ` Florian Fainelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260724214119.1066665-7-florian.fainelli@broadcom.com \
--to=florian.fainelli@broadcom.com \
--cc=anton.ivanov@cambridgegreys.com \
--cc=axboe@kernel.dk \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=benjamin.berg@intel.com \
--cc=brendan.higgins@linux.dev \
--cc=david@davidgow.net \
--cc=johannes.berg@intel.com \
--cc=johannes@sipsolutions.net \
--cc=kees@kernel.org \
--cc=kunit-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=raemoar63@gmail.com \
--cc=richard@nod.at \
--cc=stable@vger.kernel.org \
--cc=tiwei.btw@antgroup.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®