[lxc-devel] [lxc/master] start: fix error handling when limits fail to apply

Blub on Github lxc-bot at linuxcontainers.org
Tue Apr 11 14:47:08 UTC 2017


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 456 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170411/d001e204/attachment.bin>
-------------- next part --------------
From 84ff3af745462126e1a62894d536626056ed3f0b Mon Sep 17 00:00:00 2001
From: Wolfgang Bumiller <w.bumiller at proxmox.com>
Date: Tue, 11 Apr 2017 16:42:01 +0200
Subject: [PATCH] start: fix error handling when limits fail to apply

(The code was moved here from the child side of the startup
without adapting the error case.)

Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
---
 src/lxc/start.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lxc/start.c b/src/lxc/start.c
index fa1ade2..35d2ed5 100644
--- a/src/lxc/start.c
+++ b/src/lxc/start.c
@@ -1263,7 +1263,7 @@ static int lxc_spawn(struct lxc_handler *handler)
 
 	if (!lxc_list_empty(&handler->conf->limits) && setup_resource_limits(&handler->conf->limits, handler->pid)) {
 		ERROR("failed to setup resource limits for '%s'", name);
-		return -1;
+		goto out_delete_net;
 	}
 
 	if (!cgroup_setup_limits(handler, true)) {


More information about the lxc-devel mailing list