aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQing Li <qingli@FreeBSD.org>2009-10-28 22:00:49 +0000
committerQing Li <qingli@FreeBSD.org>2009-10-28 22:00:49 +0000
commit1ce9ab7f777b5fc1a0215ec8d676f1907199f4aa (patch)
tree5682d211d6da70e6198dc80703cbb11f883127e0
parente104a03eb5b99319e41f628853d90a528a16d116 (diff)
downloadsrc-1ce9ab7f777b5fc1a0215ec8d676f1907199f4aa.tar.gz
src-1ce9ab7f777b5fc1a0215ec8d676f1907199f4aa.zip
MFC r198353
Verify "smp_started" is true before calling sched_bind() and sched_unbind(). Reviewed by: kmacy Approved by: re
Notes
Notes: svn path=/releng/8.0/; revision=198568
-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 31c2acc19a9f..3ed0528dd280 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);