summaryrefslogtreecommitdiff
path: root/sys/net/if.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if.c')
-rw-r--r--sys/net/if.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 34fd1aa84d7..c6131d0dc30 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.497 2017/05/16 12:24:01 mpi Exp $ */
+/* $OpenBSD: if.c,v 1.498 2017/05/28 12:47:24 mpi Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@@ -977,8 +977,7 @@ if_deactivate(struct ifnet *ifp)
{
int s;
- s = splnet();
-
+ NET_LOCK(s);
/*
* Call detach hooks from head to tail. To make sure detach
* hooks are executed in the reverse order they were added, all
@@ -991,8 +990,7 @@ if_deactivate(struct ifnet *ifp)
if (ifp->if_carp && ifp->if_type != IFT_CARP)
carp_ifdetach(ifp);
#endif
-
- splx(s);
+ NET_UNLOCK(s);
}
/*