Skip to contentSkip to conversation

seccomp: exit if seccomp_init() fails

PATCH In review Corey Bryant 4 participants 4 messages Dec 18, 2013 – Dec 19, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 seccomp: exit if seccomp_init() fails

This fixes a bug where we weren't exiting if seccomp_init() failed.

---
 qemu-seccomp.c | 1 +
 1 file changed, 1 insertion(+)
qemu-seccomp.c +1 -0
index cf07869..b7c1253 100644
@@ -231,6 +231,7 @@ int seccomp_start(void)
 
     ctx = seccomp_init(SCMP_ACT_KILL);
     if (ctx == NULL) {
+        rc = -1;
         goto seccomp_return;
     }
 
Signature · 1 line
1.8.1.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 lines · Corey Bryant

This fixes a bug where we weren't exiting if seccomp_init() failed.

---
  qemu-seccomp.c | 1 +
  1 file changed, 1 insertion(+)
qemu-seccomp.c +0 -0
index cf07869..b7c1253 100644

qemu-seccomp.c int seccomp_start(void) · line 237

Quoted 7 lines
qemu-seccomp.c +1 -0
@@ -231,6 +231,7 @@ int seccomp_start(void)
 
      ctx = seccomp_init(SCMP_ACT_KILL);
      if (ctx == NULL) {
+        rc = -1;
          goto seccomp_return;
      }
 

ACK.

Signature · 2 lines
Eduardo Otubo
IBM Linux Technology Center
Acked-by on v1 1/1
#2 lore raw
In reply to Corey Bryant
Quoted 6 lines · Corey Bryant

This fixes a bug where we weren't exiting if seccomp_init() failed.

---
 qemu-seccomp.c | 1 +
 1 file changed, 1 insertion(+)
Quoted 11 lines
qemu-seccomp.c +1 -0
index cf07869..b7c1253 100644
@@ -231,6 +231,7 @@ int seccomp_start(void)
 
     ctx = seccomp_init(SCMP_ACT_KILL);
     if (ctx == NULL) {
+        rc = -1;
         goto seccomp_return;
     }
Signature · 2 lines
paul moore
security and virtualization @ redhat
#3 lore raw
In reply to Corey Bryant

Quoting Corey Bryant (2013-12-18 10:48:11)

Quoted 3 lines

This fixes a bug where we weren't exiting if seccomp_init() failed.

Cc'ing qemu-stable

Quoted 18 lines
---
 qemu-seccomp.c | 1 +
 1 file changed, 1 insertion(+)
qemu-seccomp.c +1 -0
index cf07869..b7c1253 100644
@@ -231,6 +231,7 @@ int seccomp_start(void)
 
     ctx = seccomp_init(SCMP_ACT_KILL);
     if (ctx == NULL) {
+        rc = -1;
         goto seccomp_return;
     }
 
Signature · 1 line
1.8.1.4