svn commit: r198306 - head/sys/net
b. f.
bf1783 at googlemail.com
Tue Oct 20 23:21:53 UTC 2009
>Author: qingli
>Date: Tue Oct 20 21:27:03 2009
>New Revision: 198306
>URL: http://svn.freebsd.org/changeset/base/198306
>Log:
> The flow-table function flowtable_route_flush() may be called
> during system initialization time. Since the flow-table is
> designed to maintain per CPU flow cache, the existing code
> did not check whether "smp_started" is true before calling
> sched_bind() and sched_unbind(), which triggers a page fault.
> Reviewed by: jeff
> MFC after: immediately
>Modified:
> head/sys/net/flowtable.c
...
>-
>- thread_lock(curthread);
>- sched_bind(curthread, i);
>- thread_unlock(curthread);
>+
>+ if (smp_started == 1) {
>+ thread_lock(curthread);
>+ sched_bind(curthread, i);
>+ thread_unlock(curthread);
>+ }
...
Are these changes going to do the right thing on non-SMP kernels?
Regards,
b.
More information about the freebsd-current
mailing list