[lxc-devel] [PATCH 8/5] unprivileged cgroup start: don't bother with devices special case

Serge Hallyn serge.hallyn at ubuntu.com
Thu Jul 25 21:58:45 UTC 2013


Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
---
 src/lxc/start.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/lxc/start.c b/src/lxc/start.c
index 9099fd6..514819b 100644
--- a/src/lxc/start.c
+++ b/src/lxc/start.c
@@ -713,14 +713,8 @@ int lxc_spawn(struct lxc_handler *handler)
 		goto out_delete_net;
 
 	if (setup_cgroup_devices(handler->cgroup, &handler->conf->cgroup, handler->conf)) {
-		/* an unfortunate special case: startup hooks may have already
-		 * setup the cgroup.  If a setting fails, and this is the devices
-		 * subsystem, *and* we are already in a subset of the cgroup,
-		 * then ignore the failure */
-		if (!is_in_subcgroup(handler->pid, "devices", handler->cgroup)) {
-			ERROR("failed to setup the devices cgroup for '%s'", name);
-			goto out_delete_net;
-		}
+		ERROR("failed to setup the devices cgroup for '%s'", name);
+		goto out_delete_net;
 	}
 
 	/* Tell the child to complete its initialization and wait for
-- 
1.8.3.2





More information about the lxc-devel mailing list