diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2023-09-08 10:06:01 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2023-09-08 10:06:11 +0000 |
commit | 9a071e4e576490370f26307405f12200218dec54 (patch) | |
tree | 368b9abb81112389992ac6af65bde35b76848f79 | |
parent | 17c17872ca98df0e2b9f9c7a2c41ef73f7dee21a (diff) | |
download | src-9a071e4e576490370f26307405f12200218dec54.tar.gz src-9a071e4e576490370f26307405f12200218dec54.zip |
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
-rw-r--r-- | sys/net/if.c | 2 |
1 files changed, 2 insertions, 0 deletions
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. |