From nobody Sun Feb 8 11:22:15 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) client-ip=63.128.21.74; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-74.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584979859; cv=none; d=zohomail.com; s=zohoarc; b=LnZ5FgFjKtsbdS9e7rTb31PbrhK91YjzAVzgmkzrq53IzJ13IIdpKNsgLpFiK6IoPQ3+eEP3VgZsop0fWziFGVLlktAjK//uC4uFTTxbDloiqaym3WYzk6K1cxtSVyeF+zNavphNzVWwrctRBxLiqB6XsiJdUN5amuSKVscsWr4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584979859; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=EPQ314nk9dsbPAlVJV5gR7QBXBD4RdNKhAyn0NCn3Wg=; b=DIrfsbHT79KqLzmLAb/HbJzwEsyEtIeUl+TgMpLB9VNuiG60ld6gNkwOhNbfrq7ExhEQ1lDjQACy16XuUkwBZSdsWC/cdVxEsVZ+blRc/1z64n/fsnULiywOwoWA4XQ7dDuVjO9fhCxbrwFTvH3Rp+xItOwUKlisDLVEp0VidjI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [63.128.21.74]) by mx.zohomail.com with SMTPS id 1584979859960749.8131354344104; Mon, 23 Mar 2020 09:10:59 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-76-BZK-bV_bPBar_mwTSHYI9g-1; Mon, 23 Mar 2020 12:10:55 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 58561800D54; Mon, 23 Mar 2020 16:10:50 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 30FA65C1D8; Mon, 23 Mar 2020 16:10:50 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 697CB86382; Mon, 23 Mar 2020 16:10:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02NGAiP1004965 for ; Mon, 23 Mar 2020 12:10:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6EF579B932; Mon, 23 Mar 2020 16:10:44 +0000 (UTC) Received: from lpt.redhat.com (unknown [10.40.208.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9BDE49B931 for ; Mon, 23 Mar 2020 16:10:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584979858; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=EPQ314nk9dsbPAlVJV5gR7QBXBD4RdNKhAyn0NCn3Wg=; b=ARZHMK4IhjQbR/8YxxV0iXfNc3418O3BNbxQrJW9R9nsP/kPha4DegqnqhVtnLchpPokf0 3vQYKwkHv5t8/f31C0st7MilY8JU+O9KO4h4BHqi1tvncW5gmTT9PpJ94NsBTnbouvVrD0 hwQH3ce8SYYy0GFL9bLdPIsgPhMjGXk= X-MC-Unique: BZK-bV_bPBar_mwTSHYI9g-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 1/4] qemu: virtiofs: kill the whole process group when stopping Date: Mon, 23 Mar 2020 17:10:34 +0100 Message-Id: <2999e56d7bf9b9899870ca7d3d327470c1bf7d4d.1584979790.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" After startup, virtiofds forks itself to drop its privileges. Kill the whole process group instead of just the parent. https://bugzilla.redhat.com/show_bug.cgi?id=3D1808697 Signed-off-by: J=C3=A1n Tomko Reported-by: Andrew Jones --- src/qemu/qemu_virtiofs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_virtiofs.c b/src/qemu/qemu_virtiofs.c index d579ce1d33..d6159206eb 100644 --- a/src/qemu/qemu_virtiofs.c +++ b/src/qemu/qemu_virtiofs.c @@ -285,7 +285,7 @@ qemuVirtioFSStop(virQEMUDriverPtr driver G_GNUC_UNUSED, =20 rc =3D virPidFileReadPathIfAlive(pidfile, &pid, NULL); if (rc >=3D 0 && pid !=3D (pid_t) -1) - virProcessKillPainfully(pid, true); + virProcessKillPainfully(-pid, true); =20 if (unlink(pidfile) < 0 && errno !=3D ENOENT) { --=20 2.25.1