Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757530AbZCMNmU (ORCPT ); Fri, 13 Mar 2009 09:42:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753737AbZCMNmK (ORCPT ); Fri, 13 Mar 2009 09:42:10 -0400 Received: from e36.co.us.ibm.com ([32.97.110.154]:59335 "EHLO e36.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752679AbZCMNmJ (ORCPT ); Fri, 13 Mar 2009 09:42:09 -0400 Date: Fri, 13 Mar 2009 08:41:39 -0500 From: "Serge E. Hallyn" To: Li Zefan Cc: Andrew Morton , Paul Menage , LKML , Linux Containers Subject: Re: [PATCH] devcgroup: avoid using cgroup_lock Message-ID: <20090313134139.GB32304@us.ibm.com> References: <49B869BB.7030907@cn.fujitsu.com> <20090312181912.GA20144@us.ibm.com> <49B9BCC7.7090908@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49B9BCC7.7090908@cn.fujitsu.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1223 Lines: 31 Quoting Li Zefan (lizf@cn.fujitsu.com): > >> @@ -426,11 +431,11 @@ static int devcgroup_access_write(struct cgroup *cgrp, struct cftype *cft, > >> const char *buffer) > >> { > >> int retval; > >> - if (!cgroup_lock_live_group(cgrp)) > > > > Does it matter that we no longer check for cgroup_is_removed()? > > > > No, this means in a rare case that the write handler is called when the cgroup > is dead, we still do the update work instead of returning ENODEV. > > This is ok, since at that time, accessing cgroup and devcgroup is still valid, > but will have no effect since there is no task in this cgroup and the cgroup > will be destroyed soon. Ok, just wanted to make sure the devcgroup couldn't be partially torn down and risking NULL or freed-memory derefs... BTW is that against linux-next? (didn't seem to apply cleanly against my 2.6.29-rc9) I guess I'd like to do a little test before acking, though it looks ok based on your answer. thanks, -serge -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/