From nobody Fri Sep 8 10:06:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RhsGB50ndz4sZyJ; Fri, 8 Sep 2023 10:06:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RhsGB4Yfgz4Mmy; Fri, 8 Sep 2023 10:06:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694167602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jaYIQldtozP/wf4BXYFbXRgCaa4pXJtBbrag4WxVgDc=; b=pb58DzZBLekBrJJU8NwmyPO8l8s4XIwSakyDUo+hv4qhUck1H0LJyrMqfe2lvvPpUZj50K G00g2rIWrVzk3/8/24DdAkwXCbJY8Chhn59M8PFwk4XGGInNHMJpagQ9/VZeJ2Rso3P5wV xNzJpE5VNtzkjRAn6VzpqTfBIzbrEWf3wPZku0HdCY87gx23RJHieqVEpLRlBxuWmFFsUT Lp8L58qjZyJiFzJ6eFbr5CC9PiS4xiRtjp1rzBH7N82zBUKH38wtz1GUP378TugioLWoYj rcCLZG2QSUC4C9K8AmkVITRSnllBGw9/gp5ni9mrMvypzfBA+IV9MHG50W83bg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694167602; a=rsa-sha256; cv=none; b=LKHWH1sGQdMEI3hr/7Y3VCzXrVQuVl5k5U5X+raRQjfDXdK1gBKykV0dBlwuc2uonREWCu H9FOxh+CY50NnVGQ3htzedP/cqgCiDVYWdw9hX4jrFQPmZ+XMXFPAj9TAuclCoSwPkrG7r /mVZE9T4wht4CJNxQKtzQCD3tMJ0Ae6jsacfG5hNxEVE5pJhgh4aINDmrSN3bgpmfVX+DW kXn40ySqrrQ8eFuFdyLf5XuRt9mxPHs9pfKfWsw2CU3ixX8C2HOFkeBun+CzbG0Euop1+s dgCTUyvsteG1W2UVjE5O5t8Btu7ZeRInZfUA5ZaSQ9IUQDcxR2HTRUw7ZASARA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694167602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jaYIQldtozP/wf4BXYFbXRgCaa4pXJtBbrag4WxVgDc=; b=w0NKklEZgq9612SXSd4aHdihitHvZnEjiXO2xdIgcCLKrFevTI7vnhPi7AwQPlA8gd5QZe gY1RmUpoYsqZkN4IxSy3DIJIWy7hKs4Be33sG528LAeiNlSn0Gbiog0QZ+rXFNIGUWT2nm t/Jyvna9Eiv+yMnyo5wXq0MW4HCe6d4uRf+HLPEx0UDu2QtgfHT9W+jx9dnlHpJ+0oAywu yOk3xE7HgW5rFIWR4qIGfQDMkV6E72ukyA7zXBEcJTT50zoeVuk7wp0QfQgNeQ+QhwXttb x8RMkVhlGUrI8Rdncbr3L8gtLC9lc+UY9hb11CK23/nZwDtHBlvTYFNrTBhvkg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RhsGB3X7pzdLJ; Fri, 8 Sep 2023 10:06:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 388A6gaV025382; Fri, 8 Sep 2023 10:06:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 388A6gMN025379; Fri, 8 Sep 2023 10:06:42 GMT (envelope-from git) Date: Fri, 8 Sep 2023 10:06:42 GMT Message-Id: <202309081006.388A6gMN025379@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 9a071e4e5764 - main - Assert that ifnet_detach_sxlock is held where needed. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9a071e4e576490370f26307405f12200218dec54 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=9a071e4e576490370f26307405f12200218dec54 commit 9a071e4e576490370f26307405f12200218dec54 Author: Dag-Erling Smørgrav AuthorDate: 2023-09-08 10:06:01 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-09-08 10:06:11 +0000 Assert that ifnet_detach_sxlock is held where needed. Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D41770 --- sys/net/if.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/net/if.c b/sys/net/if.c index 7a78ebcfea05..f7636d46331a 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1128,6 +1128,8 @@ if_detach_internal(struct ifnet *ifp, bool vmove) shutdown = VNET_IS_SHUTTING_DOWN(ifp->if_vnet); #endif + sx_assert(&ifnet_detach_sxlock, SX_XLOCKED); + /* * At this point we know the interface still was on the ifnet list * and we removed it so we are in a stable state.