linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] cls_cgroup: fix an oops when removing a cgroup
@ 2008-12-29  3:57 Li Zefan
  2009-01-05 16:10 ` Thomas Graf
  0 siblings, 1 reply; 2+ messages in thread
From: Li Zefan @ 2008-12-29  3:57 UTC (permalink / raw)
  To: David Miller; +Cc: Thomas Graf, LKML, netdev

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>
---
 net/sched/cls_cgroup.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c
index 0d68b19..31d95b1 100644
--- a/net/sched/cls_cgroup.c
+++ b/net/sched/cls_cgroup.c
@@ -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)
-- 
1.5.4.rc3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/3] cls_cgroup: fix an oops when removing a cgroup
  2008-12-29  3:57 [PATCH 1/3] cls_cgroup: fix an oops when removing a cgroup Li Zefan
@ 2009-01-05 16:10 ` Thomas Graf
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Graf @ 2009-01-05 16:10 UTC (permalink / raw)
  To: Li Zefan; +Cc: David Miller, LKML, netdev

* Li Zefan <lizf@cn.fujitsu.com> 2008-12-29 11:57
> When removing a cgroup, an oops was triggered immediately. The cause
> is wrong kfree() in cgrp_destroy().

Good catch.

Acked-by: Thomas Graf <tgraf@suug.ch>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-01-05 16:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-29  3:57 [PATCH 1/3] cls_cgroup: fix an oops when removing a cgroup Li Zefan
2009-01-05 16:10 ` Thomas Graf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).