From mboxrd@z Thu Jan 1 00:00:00 1970 From: Li Zefan Subject: Re: [PATCH cgroup/for-3.12 2/2] cgroup: fix cgroup_write_event_control() Date: Mon, 19 Aug 2013 10:41:55 +0800 Message-ID: <521185F3.6060806@huawei.com> References: <20130815154236.GG14606@htj.dyndns.org> <20130815154315.GH14606@htj.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130815154315.GH14606-Gd/HAXX7CRxy/B6EtB590w@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/8/15 23:43, Tejun Heo wrote: >>>From ced043264c9c3f03ab3c992af17461db50421dd8 Mon Sep 17 00:00:00 2001 > From: Tejun Heo > Date: Thu, 15 Aug 2013 11:37:54 -0400 > > 81eeaf0411 ("cgroup: make cftype->[un]register_event() deal with > cgroup_subsys_state inst ead of cgroup") updated the cftype event > methods to take @css (cgroup_subsys_state) instead of @cgroup; > however, it incorrectly used @css passed to > cgroup_write_event_control(), which the dummy_css for the cgroup as > the file is a cgroup core file. This leads to oops on event > registration. > > Fix it by using the css matching the event target file. Note that > cgroup_write_event_control() now disallows cgroup core files from > being event sources. This is for simplicity and doesn't matter as > cgroup_event will be moved and made specific to memcg. > > Signed-off-by: Tejun Heo Acked-by: Li Zefan