| To: | "David S. Miller" <davem@xxxxxxxxxxxxx> |
|---|---|
| Subject: | [PATCH 6/6] PKT_SCHED: break is not enough to stop walking |
| From: | Thomas Graf <tgraf@xxxxxxx> |
| Date: | Fri, 29 Oct 2004 02:26:28 +0200 |
| Cc: | netdev@xxxxxxxxxxx, hadi@xxxxxxxxxx |
| In-reply-to: | <20041029002113.GY12289@xxxxxxxxxxxxxx> |
| References: | <20041029002113.GY12289@xxxxxxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
break is not enough to escape from the walking loops, since
multiple encapsulated loops are used to traverse the hash tables.
Signed-off-by: Thomas Graf <tgraf@xxxxxxx>
diff -Nru linux-2.6.10-rc1-bk7.orig/net/sched/cls_fw.c
linux-2.6.10-rc1-bk7/net/sched/cls_fw.c
--- linux-2.6.10-rc1-bk7.orig/net/sched/cls_fw.c 2004-10-29
00:43:38.000000000 +0200
+++ linux-2.6.10-rc1-bk7/net/sched/cls_fw.c 2004-10-29 00:50:29.000000000
+0200
@@ -338,7 +338,7 @@
}
if (arg->fn(tp, (unsigned long)f, arg) < 0) {
arg->stop = 1;
- break;
+ return;
}
arg->count++;
}
diff -Nru linux-2.6.10-rc1-bk7.orig/net/sched/cls_route.c
linux-2.6.10-rc1-bk7/net/sched/cls_route.c
--- linux-2.6.10-rc1-bk7.orig/net/sched/cls_route.c 2004-10-28
22:03:29.000000000 +0200
+++ linux-2.6.10-rc1-bk7/net/sched/cls_route.c 2004-10-29 01:31:12.000000000
+0200
@@ -538,7 +538,7 @@
}
if (arg->fn(tp, (unsigned long)f, arg)
< 0) {
arg->stop = 1;
- break;
+ return;
}
arg->count++;
}
diff -Nru linux-2.6.10-rc1-bk7.orig/net/sched/cls_rsvp.h
linux-2.6.10-rc1-bk7/net/sched/cls_rsvp.h
--- linux-2.6.10-rc1-bk7.orig/net/sched/cls_rsvp.h 2004-10-28
22:03:29.000000000 +0200
+++ linux-2.6.10-rc1-bk7/net/sched/cls_rsvp.h 2004-10-29 01:31:49.000000000
+0200
@@ -601,7 +601,7 @@
}
if (arg->fn(tp, (unsigned long)f, arg)
< 0) {
arg->stop = 1;
- break;
+ return;
}
arg->count++;
}
|
| Previous by Date: | [PATCH 5/6] cls_fw: Whitespace/ifdef fixes, Thomas Graf |
|---|---|
| Next by Date: | [PATCH 2.4] PKT_SCHED: break is not enough to stop walking, Thomas Graf |
| Previous by Thread: | [PATCH 5/6] cls_fw: Whitespace/ifdef fixes, Thomas Graf |
| Next by Thread: | [PATCH 7/6] cls_fw: CONFIG_NET_CLS_IND is not dependant on CONFIG_NET_CLS_ACT, Thomas Graf |
| Indexes: | [Date] [Thread] [Top] [All Lists] |