[PATCH 1/1] cgroup mount: ignore nsroot=

Serge Hallyn serge.hallyn at ubuntu.com
Wed Mar 30 18:19:32 UTC 2016


(I realize it's probably too late for anything but SRU at this point.  The
motivator for this is criu live migration, where it is needed for container
restart (not checkpoint afaik))

our mountinfo output now shows 'nsroot='.  If userspace like
criu copy/pastes mount options from there into a new mount
command, we should ignore it.

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Tested-by: Tycho Andersen <tycho.andersen at canonical.com>
---
 kernel/cgroup.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index ef0c25d..69fb112 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -1680,6 +1680,10 @@ static int parse_cgroupfs_options(char *data, struct cgroup_sb_opts *opts)
 			opts->none = true;
 			continue;
 		}
+		if (!strncmp(token, "nsroot=", 7)) {
+			/* ignore nsroot= copied from mountinfo */
+			continue;
+		}
 		if (!strcmp(token, "all")) {
 			/* Mutually exclusive option 'all' + subsystem name */
 			if (one_ss)
-- 
2.7.0





More information about the kernel-team mailing list