From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Serge E. Hallyn" Subject: Re: [PATCHv1 5/8] cgroup: introduce cgroup namespaces Date: Sat, 25 Oct 2014 05:16:08 +0200 Message-ID: <20141025031608.GA13250@mail.hallyn.com> References: <1413235430-22944-1-git-send-email-adityakali@google.com> <1413235430-22944-6-git-send-email-adityakali@google.com> <20141016163703.GE1392@mail.hallyn.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Aditya Kali Cc: Linux API , Linux Containers , Serge Hallyn , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Andy Lutomirski , Tejun Heo , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Ingo Molnar List-Id: linux-api@vger.kernel.org Quoting Aditya Kali (adityakali-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org): > >> +void free_cgroup_ns(struct cgroup_namespace *ns) > >> +{ > >> + cgroup_put(ns->root_cgrp); > >> + put_user_ns(ns->user_ns); > > > > This is a problem on error patch in copy_cgroup_ns. The > > alloc_cgroup_ns() doesn't initialize these values, so if > > you should fail in proc_alloc_inum() you'll show up here > > with fandom values in ns->*. > > > > I don't see the codepath that leads to calling free_cgroup_ns() with > uninitialized members. We don't call free_cgroup_ns() on the error > path in copy_cgroup_ns(). Hm, yeah, I'm not seeing it now, sorry.