All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
To: khorenko@virtuozzo.com
Cc: devel@openvz.org
Subject: [Devel] [PATCH hci-8.1 v2 2/2] ms/um: Set parent death signal for userspace process
Date: Thu, 29 Oct 2026 19:04:36 +0200	[thread overview]
Message-ID: <20261029170613.1649335-3-eva.kurchatova@virtuozzo.com> (raw)
In-Reply-To: <20261029170613.1649335-1-eva.kurchatova@virtuozzo.com>

From: Benjamin Berg <benjamin.berg@intel.com>

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>
(cherry picked from commit 801e00d3a1b78b7f71675fae79946ff4aa3ee070)

Rebase note: the userspace process is set up differenly before commit
32e8eaf263d9 ("um: use execveat to create userspace MMs"), whith this
tree lacks, so set parent death signal up in userspace_tramp() rather
than in the stub executable.

https://virtuozzo.atlassian.net/browse/VSTOR-143633
Feature: fix ms/um

Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.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.56.0

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  parent reply	other threads:[~2026-10-29 17:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29 17:04 [Devel] [PATCH hci-8.1 v2 0/2] " Eva Kurchatova
2026-10-29 17:04 ` [Devel] [PATCH hci-8.1 v2 1/2] ms/um: Add os_set_pdeathsig helper function Eva Kurchatova
2026-10-29 17:08   ` no-reply
2026-10-29 17:04 ` Eva Kurchatova [this message]
2026-10-29 17:08   ` [Devel] [PATCH hci-8.1 v2 2/2] ms/um: Set parent death signal for userspace process no-reply
2026-10-29 17:30 ` [Devel] [PATCH hci-8.1 v2 0/2] " Konstantin Khorenko

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=20261029170613.1649335-3-eva.kurchatova@virtuozzo.com \
    --to=eva.kurchatova@virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=khorenko@virtuozzo.com \
    /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 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.