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: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
684f4a4c4a
commit
2f068bf871
@@ -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)
|
||||||
|
Reference in New Issue
Block a user