diff options
author | qingli <qingli@FreeBSD.org> | 2009-10-22 00:32:01 +0000 |
---|---|---|
committer | qingli <qingli@FreeBSD.org> | 2009-10-22 00:32:01 +0000 |
commit | e4c3421f523ba376c7b4cd9303c17ad43702b538 (patch) | |
tree | 256796d7b3b36d86e9407a04d3266456ca96e083 /sys/net | |
parent | a72663b23bf3cf6b649e0ef3794c893c317ed0bd (diff) | |
download | FreeBSD-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')
-rw-r--r-- | sys/net/flowtable.c | 16 |
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); |