Date: Wed, 28 Oct 2009 21:43:16 +0000 (UTC) From: Qing Li <qingli@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r198566 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci net Message-ID: <200910282143.n9SLhGhd073290@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: qingli Date: Wed Oct 28 21:43:16 2009 New Revision: 198566 URL: http://svn.freebsd.org/changeset/base/198566 Log: MFC r198353 Verify "smp_started" is true before calling sched_bind() and sched_unbind(). Reviewed by: kmacy Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/net/flowtable.c Modified: stable/8/sys/net/flowtable.c ============================================================================== --- stable/8/sys/net/flowtable.c Wed Oct 28 21:41:23 2009 (r198565) +++ stable/8/sys/net/flowtable.c Wed Oct 28 21:43:16 2009 (r198566) @@ -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?200910282143.n9SLhGhd073290>