netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6 NET] Fixes slab corruption in cbq_destroy
@ 2004-09-16 13:28 Thomas Graf
  2004-09-16 13:47 ` Patrick McHardy
  2004-09-16 20:29 ` David S. Miller
  0 siblings, 2 replies; 6+ messages in thread
From: Thomas Graf @ 2004-09-16 13:28 UTC (permalink / raw)
  To: David S. Miller; +Cc: Patrick McHardy, Alexey Kuznetsov, netdev

Fixes slab corruption in cbq_destroy. cbq_destroy_filters and
qdisc_put_rtab(q->link.R_tab) are already called in cbq_destroy_class.
The latter lead to a slab corruption due to repeated freeing of
q->link.R_tab because q->link is part of q->classes. Problem introduced
in 1.21.

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


--- linux-2.6.9-rc2-bk2.orig/net/sched/sch_cbq.c	2004-09-16 14:52:23.000000000 +0200
+++ linux-2.6.9-rc2-bk2/net/sched/sch_cbq.c	2004-09-16 14:53:53.000000000 +0200
@@ -1770,10 +1770,6 @@
 #ifdef CONFIG_NET_CLS_POLICE
 	q->rx_class = NULL;
 #endif
-	for (h = 0; h < 16; h++) {
-		for (cl = q->classes[h]; cl; cl = cl->next)
-			cbq_destroy_filters(cl);
-	}
 
 	for (h = 0; h < 16; h++) {
 		struct cbq_class *next;
@@ -1783,8 +1779,6 @@
 			cbq_destroy_class(sch, cl);
 		}
 	}
-
-	qdisc_put_rtab(q->link.R_tab);
 }
 
 static void cbq_put(struct Qdisc *sch, unsigned long arg)

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

end of thread, other threads:[~2004-09-16 20:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-16 13:28 [PATCH 2.6 NET] Fixes slab corruption in cbq_destroy Thomas Graf
2004-09-16 13:47 ` Patrick McHardy
2004-09-16 14:09   ` Thomas Graf
2004-09-16 14:58     ` Patrick McHardy
2004-09-16 20:33       ` Thomas Graf
2004-09-16 20:29 ` David S. Miller

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).