Commit 2f068bf8 authored by Li Zefan's avatar Li Zefan Committed by David S. Miller

cls_cgroup: fix an oops when removing a cgroup

When removing a cgroup, an oops was triggered immediately. The cause
is wrong kfree() in cgrp_destroy().
Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 684f4a4c
...@@ -46,7 +46,7 @@ static struct cgroup_subsys_state *cgrp_create(struct cgroup_subsys *ss, ...@@ -46,7 +46,7 @@ static struct cgroup_subsys_state *cgrp_create(struct cgroup_subsys *ss,
static void cgrp_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp) static void cgrp_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp)
{ {
kfree(ss); kfree(net_cls_state(cgrp));
} }
static u64 read_classid(struct cgroup *cgrp, struct cftype *cft) static u64 read_classid(struct cgroup *cgrp, struct cftype *cft)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment