diff options
author | 2017-02-01 01:25:19 +0000 | |
---|---|---|
committer | 2017-02-01 01:25:19 +0000 | |
commit | 7f9444671d613e989f40e1afef5f5d05fc95b9f7 (patch) | |
tree | 8b6cb5fa6da1d9c598bfccdef7c8b5b1ba08228f | |
parent | sync (diff) | |
download | wireguard-openbsd-7f9444671d613e989f40e1afef5f5d05fc95b9f7.tar.xz wireguard-openbsd-7f9444671d613e989f40e1afef5f5d05fc95b9f7.zip |
Switch from splsoftnet to taking the netlock in if_attachhead().
The same change was made to if_attach() in rev 1.467.
ok mpi@
-rw-r--r-- | sys/net/if.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 0dd6e9aac17..5d11b721071 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.483 2017/01/31 12:16:20 mpi Exp $ */ +/* $OpenBSD: if.c,v 1.484 2017/02/01 01:25:19 jsg Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -513,11 +513,11 @@ if_attachhead(struct ifnet *ifp) { int s; - s = splsoftnet(); + NET_LOCK(s); if_attach_common(ifp); TAILQ_INSERT_HEAD(&ifnet, ifp, if_list); if_attachsetup(ifp); - splx(s); + NET_UNLOCK(s); } void |