Skip to content

Commit

Permalink
cls_cgroup: fix an oops when removing a cgroup
Browse files Browse the repository at this point in the history
When removing a cgroup, an oops was triggered immediately. The cause
is wrong kfree() in cgrp_destroy().

Signed-off-by: Li Zefan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Li Zefan authored and davem330 committed Dec 30, 2008
1 parent 684f4a4 commit 2f068bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sched/cls_cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
kfree(ss);
kfree(net_cls_state(cgrp));
}

static u64 read_classid(struct cgroup *cgrp, struct cftype *cft)
Expand Down

0 comments on commit 2f068bf

Please sign in to comment.