Commit 2f068bf8711c35b98bf9a0172555b8390a762fc0

Authored by Li Zefan
Committed by David S. Miller
1 parent 684f4a4c4a

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

net/sched/cls_cgroup.c
... ... @@ -46,7 +46,7 @@
46 46  
47 47 static void cgrp_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp)
48 48 {
49   - kfree(ss);
  49 + kfree(net_cls_state(cgrp));
50 50 }
51 51  
52 52 static u64 read_classid(struct cgroup *cgrp, struct cftype *cft)