提交 2f068bf8 编写于 作者: L Li Zefan 提交者: 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: NLi Zefan <lizf@cn.fujitsu.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册