cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
0a122b
From 77b56ef5c4488f32151018c06443c701d6173ce7 Mon Sep 17 00:00:00 2001
0a122b
From: Paul Moore <pmoore@redhat.com>
0a122b
Date: Fri, 20 Dec 2013 21:43:16 +0100
0a122b
Subject: [PATCH 04/16] seccomp: exit if seccomp_init() fails
0a122b
0a122b
RH-Author: Paul Moore <pmoore@redhat.com>
0a122b
Message-id: <20131220214316.2542.64440.stgit@localhost>
0a122b
Patchwork-id: 56418
0a122b
O-Subject: [RHEL7 qemu-kvm PATCH] seccomp: exit if seccomp_init() fails
0a122b
Bugzilla: 1044845
0a122b
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
0a122b
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
0a122b
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
0a122b
0a122b
From: Corey Bryant <coreyb@linux.vnet.ibm.com>
0a122b
0a122b
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1044845
0a122b
Brew: https://brewweb.devel.redhat.com/taskinfo?taskID=6770015
0a122b
Upstream: merged into the QEMU seccomp tree
0a122b
          git://github.com/otubo/qemu.git seccomp
0a122b
Testing: Tested by IBM, see BZ
0a122b
0a122b
	seccomp: exit if seccomp_init() fails
0a122b
0a122b
	This fixes a bug where we weren't exiting if seccomp_init() failed.
0a122b
0a122b
	Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com>
0a122b
	Acked-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
0a122b
	Acked-by: Paul Moore <pmoore@redhat.com>
0a122b
        (cherry picked from commit 2a13f991123fa16841e6d94b02a9cc2c76d91725)
0a122b
        Signed-off-by: Paul Moore <pmoore@redhat.com>
0a122b
---
0a122b
 qemu-seccomp.c |    1 +
0a122b
 1 file changed, 1 insertion(+)
0a122b
0a122b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
0a122b
---
0a122b
 qemu-seccomp.c |    1 +
0a122b
 1 files changed, 1 insertions(+), 0 deletions(-)
0a122b
0a122b
diff --git a/qemu-seccomp.c b/qemu-seccomp.c
0a122b
index 906101f..fc48bdd 100644
0a122b
--- a/qemu-seccomp.c
0a122b
+++ b/qemu-seccomp.c
0a122b
@@ -248,6 +248,7 @@ int seccomp_start(void)
0a122b
 
0a122b
     ctx = seccomp_init(SCMP_ACT_KILL);
0a122b
     if (ctx == NULL) {
0a122b
+        rc = -1;
0a122b
         goto seccomp_return;
0a122b
     }
0a122b
 
0a122b
-- 
0a122b
1.7.1
0a122b