Date: Sun, 31 May 2020 18:42:00 +0000 (UTC) From: Matt Macy <mmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r361665 - head/sys/net Message-ID: <202005311842.04VIg0WP087901@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mmacy Date: Sun May 31 18:42:00 2020 New Revision: 361665 URL: https://svnweb.freebsd.org/changeset/base/361665 Log: Fix panics when using iflib pseudo device support Reviewed by: gallatin@, hselasky@ MFC after: 1 week Sponsored by: Netgate, Inc. Differential Revision: https://reviews.freebsd.org/D23710 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Sun May 31 18:20:20 2020 (r361664) +++ head/sys/net/iflib.c Sun May 31 18:42:00 2020 (r361665) @@ -4902,6 +4902,7 @@ iflib_pseudo_register(device_t dev, if_shared_ctx_t sc if_setgetcounterfn(ctx->ifc_ifp, iflib_if_get_counter); iflib_add_device_sysctl_post(ctx); ctx->ifc_flags |= IFC_INIT_DONE; + CTX_UNLOCK(ctx); return (0); } _iflib_pre_assert(scctx); @@ -5354,7 +5355,8 @@ iflib_register(if_ctx_t ctx) device_t dev = ctx->ifc_dev; if_t ifp; - _iflib_assert(sctx); + if ((sctx->isc_flags & IFLIB_PSEUDO) == 0) + _iflib_assert(sctx); CTX_LOCK_INIT(ctx); STATE_LOCK_INIT(ctx, device_get_nameunit(ctx->ifc_dev));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005311842.04VIg0WP087901>