svn commit: r339293 - stable/11/sys/net
John Baldwin
jhb at FreeBSD.org
Wed Oct 10 21:28:05 UTC 2018
Author: jhb
Date: Wed Oct 10 21:28:04 2018
New Revision: 339293
URL: https://svnweb.freebsd.org/changeset/base/339293
Log:
Disable the KASSERT for curcpu == 0 in netisr for EARLY_AP_STARTUP.
In the EARLY_AP_STARTUP case, thread0 can migrate to another CPU
before this SYSINIT is run. However, the only part of this SYSINIT
that assumes it runs on CPU 0 is in the !EARLY_AP_STARTUP case when it
creates the netisr for the boot CPU. In the EARLY_AP_STARTUP case we
start up the netisr's for the first N CPUs during the SYSINIT itself
and don't depend on running on the boot CPU for correct operation.
This is a direct comit to stable/11 as the assertion was removed as part
of a different change in r302595.
Reported by: rwatson, truckman, jkim, FreeNAS bug 45611
Modified:
stable/11/sys/net/netisr.c
Modified: stable/11/sys/net/netisr.c
==============================================================================
--- stable/11/sys/net/netisr.c Wed Oct 10 20:25:41 2018 (r339292)
+++ stable/11/sys/net/netisr.c Wed Oct 10 21:28:04 2018 (r339293)
@@ -1272,8 +1272,6 @@ netisr_init(void *arg)
struct pcpu *pc;
#endif
- KASSERT(curcpu == 0, ("%s: not on CPU 0", __func__));
-
NETISR_LOCK_INIT();
if (netisr_maxthreads == 0 || netisr_maxthreads < -1 )
netisr_maxthreads = 1; /* default behavior */
@@ -1310,6 +1308,7 @@ netisr_init(void *arg)
netisr_start_swi(pc->pc_cpuid, pc);
}
#else
+ KASSERT(curcpu == 0, ("%s: not on CPU 0", __func__));
netisr_start_swi(curcpu, pcpu_find(curcpu));
#endif
}
More information about the svn-src-all
mailing list