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