Date: Thu, 22 Oct 2009 00:32:01 +0000 (UTC) From: Qing Li <qingli@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r198353 - head/sys/net Message-ID: <200910220032.n9M0W1pV014546@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910220032.n9M0W1pV014546>