diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2021-06-30 13:23:34 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2021-06-30 13:23:34 +0000 |
commit | d9ae7e7a4c7d6d96f87cd1dcd6093564fd2b1aaf (patch) | |
tree | 8771e8e4d32aafa17aecf3031f268ddd234cd99e /sys/net | |
parent | 08233dd7d2ea88cc0b760ea4b757c7d602ad5fd9 (diff) |
Remove splnet() from ifnewlladdr(), it is not needed anymore.
Add asserts and comments for the locks that are necessary.
discussed with dlg@ mpi@ mvs@; tested by Hrvoje Popovski; OK mpi@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index e375f5211db..91f544e0ed3 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.641 2021/05/25 22:45:09 bluhm Exp $ */ +/* $OpenBSD: if.c,v 1.642 2021/06/30 13:23:33 bluhm Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -3107,9 +3107,10 @@ ifnewlladdr(struct ifnet *ifp) #endif struct ifreq ifrq; short up; - int s; - s = splnet(); + NET_ASSERT_LOCKED(); /* for ioctl and in6 */ + KERNEL_ASSERT_LOCKED(); /* for if_flags */ + up = ifp->if_flags & IFF_UP; if (up) { @@ -3143,7 +3144,6 @@ ifnewlladdr(struct ifnet *ifp) ifrq.ifr_flags = ifp->if_flags; (*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, (caddr_t)&ifrq); } - splx(s); } void |