Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754918AbcC3RVG (ORCPT ); Wed, 30 Mar 2016 13:21:06 -0400 Received: from h2.hallyn.com ([78.46.35.8]:52054 "EHLO h2.hallyn.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753092AbcC3RVD (ORCPT ); Wed, 30 Mar 2016 13:21:03 -0400 Date: Wed, 30 Mar 2016 12:21:00 -0500 From: "Serge E. Hallyn" To: "Serge E. Hallyn" Cc: Tycho Andersen , tj@kernel.org, linux-api@vger.kernel.org, adityakali@google.com, Linux Containers , "Eric W. Biederman" , cgroups@vger.kernel.org, lkml Subject: [PATCH] cgroup mount: ignore nsroot= Message-ID: <20160330172100.GA11373@mail.hallyn.com> References: <20160321234133.GA22463@mail.hallyn.com> <20160329135851.GN8544@smitten> <20160329200018.GA21908@mail.hallyn.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160329200018.GA21908@mail.hallyn.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 825 Lines: 27 As of the patch "cgroup namespaces: add a 'nsroot=' mountinfo field", cgroupfs mountinfo output 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 --- 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