Date: Wed, 10 Oct 2018 21:28:04 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r339293 - stable/11/sys/net Message-ID: <201810102128.w9ALS470088782@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810102128.w9ALS470088782>