diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-10-07 08:47:29 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-10-07 08:47:29 +0000 |
commit | 760f776a7ddeb43d69746282cc5b3f03a86d10d3 (patch) | |
tree | 985eee6f0952dc7bdebef9ab5347a2f9e92afd1c /sys/net/if_loop.c | |
parent | f65cbbd9acc27d42ed33838bbf0bac14a7b80b2b (diff) |
Do not protect the SIOCSIFADDR call by splnet(). Drivers already
raise it inside their ioctl handler (except for carp(4), what else?).
In general, global structures manipulated in the softnet codepath only
require a splsoftnet() protection when they are modified in process
(ioctl) context.
Also put some IPL_SOFNET asserts in functions accessing global structures.
Previous version diff ok mikeb@, with inputs from and ok bluhm@
Diffstat (limited to 'sys/net/if_loop.c')
-rw-r--r-- | sys/net/if_loop.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index 1e9172ce622..07f8c172a4a 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_loop.c,v 1.57 2014/07/22 11:06:09 mpi Exp $ */ +/* $OpenBSD: if_loop.c,v 1.58 2014/10/07 08:47:28 mpi Exp $ */ /* $NetBSD: if_loop.c,v 1.15 1996/05/07 02:40:33 thorpej Exp $ */ /* @@ -288,15 +288,13 @@ loioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct ifaddr *ifa; struct ifreq *ifr; - int s, error = 0; + int error = 0; switch (cmd) { case SIOCSIFADDR: - s = splnet(); ifp->if_flags |= IFF_RUNNING; if_up(ifp); /* send up RTM_IFINFO */ - splx(s); ifa = (struct ifaddr *)data; if (ifa != 0) |