svn commit: r198353 - head/sys/net

Qing Li qingli at FreeBSD.org
Thu Oct 22 00:32:01 UTC 2009


Author: qingli
Date: Thu Oct 22 00:32:01 2009
New Revision: 198353
URL: http://svn.freebsd.org/changeset/base/198353

Log:
  Verify "smp_started" is true before calling
  sched_bind() and sched_unbind().
  
  Reviewed by:	kmacy
  MFC after:	3 days

Modified:
  head/sys/net/flowtable.c

Modified: head/sys/net/flowtable.c
==============================================================================
--- head/sys/net/flowtable.c	Wed Oct 21 23:50:35 2009	(r198352)
+++ head/sys/net/flowtable.c	Thu Oct 22 00:32:01 2009	(r198353)
@@ -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);


More information about the svn-src-all mailing list