summaryrefslogtreecommitdiffstats
path: root/sys/net/flowtable.c
diff options
context:
space:
mode:
authorqingli <qingli@FreeBSD.org>2009-10-22 00:32:01 +0000
committerqingli <qingli@FreeBSD.org>2009-10-22 00:32:01 +0000
commite4c3421f523ba376c7b4cd9303c17ad43702b538 (patch)
tree256796d7b3b36d86e9407a04d3266456ca96e083 /sys/net/flowtable.c
parenta72663b23bf3cf6b649e0ef3794c893c317ed0bd (diff)
downloadFreeBSD-src-e4c3421f523ba376c7b4cd9303c17ad43702b538.zip
FreeBSD-src-e4c3421f523ba376c7b4cd9303c17ad43702b538.tar.gz
Verify "smp_started" is true before calling
sched_bind() and sched_unbind(). Reviewed by: kmacy MFC after: 3 days
Diffstat (limited to 'sys/net/flowtable.c')
-rw-r--r--sys/net/flowtable.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/net/flowtable.c b/sys/net/flowtable.c
index 31c2acc..3ed0528 100644
--- a/sys/net/flowtable.c
+++ b/sys/net/flowtable.c
@@ -963,15 +963,19 @@ flowtable_clean_vnet(void)
if (CPU_ABSENT(i))
continue;
- thread_lock(curthread);
- sched_bind(curthread, i);
- thread_unlock(curthread);
+ if (smp_started == 1) {
+ thread_lock(curthread);
+ sched_bind(curthread, i);
+ thread_unlock(curthread);
+ }
flowtable_free_stale(ft, NULL);
- thread_lock(curthread);
- sched_unbind(curthread);
- thread_unlock(curthread);
+ if (smp_started == 1) {
+ thread_lock(curthread);
+ sched_unbind(curthread);
+ thread_unlock(curthread);
+ }
}
} else {
flowtable_free_stale(ft, NULL);
OpenPOWER on IntegriCloud