[Devel] [PATCH cgroup/for-3.14] cgroup: fix fail path in cgroup_load_subsys()
Tejun Heo
tj at kernel.org
Fri Dec 13 12:47:57 PST 2013
On Thu, Dec 12, 2013 at 11:17:08PM +0400, Vladimir Davydov wrote:
> Calling cgroup_unload_subsys() from cgroup_load_subsys() after
> online_css() failure will result in a NULL ptr dereference on attempt to
> offline_css(), because online_css() only assigns css to cgroup on
> success. Let's fix that by skipping calls to offline_css() and
> css_free() in cgroup_unload_subsys() if there is no css, and freeing css
> in cgroup_load_subsys() on online_css() failure.
>
> Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
> Cc: Tejun Heo <tj at kernel.org>
> Cc: Li Zefan <lizefan at huawei.com>
Applied to cgroup/for-3.14.
Thanks!
--
tejun
More information about the Devel
mailing list