From mboxrd@z Thu Jan 1 00:00:00 1970 From: Li Zefan Subject: Re: [PATCH 3/9] cgroup: fix cgroup_add_cftypes() error handling Date: Thu, 11 Jul 2013 14:43:32 +0800 Message-ID: <51DE5414.6040608@huawei.com> References: <1372463145-4245-1-git-send-email-tj@kernel.org> <1372463145-4245-4-git-send-email-tj@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1372463145-4245-4-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> List-Id: 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: Tejun Heo Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org On 2013/6/29 7:45, Tejun Heo wrote: > cgroup_add_cftypes() uses cgroup_cfts_commit() to actually create the > files; however, both functions ignore actual file creation errors and > just assume success. This can lead to, for example, blkio hierarchy > with some of the cgroups with only subset of interface files populated > after cfq-iosched is loaded under heavy memory pressure, which is > nasty. > > This patch updates cgroup_cfts_commit() and cgroup_add_cftypes() to > guarantee that all files are created on success and no file is created > on failure. > > Signed-off-by: Tejun Heo Acked-by: Li Zefan