diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-12-29 12:12:45 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-12-29 12:12:45 +0000 |
commit | 43d7b0d234e6f2b140d987dbcc6ab59002de6b84 (patch) | |
tree | 71fb4ae86dea7c7efea84b368c8cbf388b096840 /sys/net/if_pflow.c | |
parent | 7f580a7e15408fd9f7aab67ee05141cffcb972ee (diff) |
Change NET_LOCK()/NET_UNLOCK() to be simple wrappers around
splsoftnet()/splx() until the known issues are fixed.
In other words, stop using a rwlock since it creates a deadlock when
chrome is used.
Issue reported by Dimitris Papastamos and kettenis@
ok visa@
Diffstat (limited to 'sys/net/if_pflow.c')
-rw-r--r-- | sys/net/if_pflow.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/sys/net/if_pflow.c b/sys/net/if_pflow.c index d625e8c45b1..d66679e7ac4 100644 --- a/sys/net/if_pflow.c +++ b/sys/net/if_pflow.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pflow.c,v 1.64 2016/12/21 12:28:49 mikeb Exp $ */ +/* $OpenBSD: if_pflow.c,v 1.65 2016/12/29 12:12:43 mpi Exp $ */ /* * Copyright (c) 2011 Florian Obser <florian@narrans.de> @@ -375,8 +375,6 @@ pflowioctl(struct ifnet *ifp, u_long cmd, caddr_t data) } } - /* XXXSMP breaks atomicity */ - rw_exit_write(&netlock); s = splnet(); pflow_flush(sc); @@ -400,7 +398,6 @@ pflowioctl(struct ifnet *ifp, u_long cmd, caddr_t data) sizeof(struct sockaddr_in), M_DEVBUF, M_NOWAIT)) == NULL) { splx(s); - rw_enter_write(&netlock); return (ENOMEM); } memcpy(sc->sc_flowdst, &pflowr.flowdst, @@ -413,7 +410,6 @@ pflowioctl(struct ifnet *ifp, u_long cmd, caddr_t data) sizeof(struct sockaddr_in6), M_DEVBUF, M_NOWAIT)) == NULL) { splx(s); - rw_enter_write(&netlock); return (ENOMEM); } memcpy(sc->sc_flowdst, &pflowr.flowdst, @@ -453,7 +449,6 @@ pflowioctl(struct ifnet *ifp, u_long cmd, caddr_t data) sizeof(struct sockaddr_in), M_DEVBUF, M_NOWAIT)) == NULL) { splx(s); - rw_enter_write(&netlock); return (ENOMEM); } memcpy(sc->sc_flowsrc, &pflowr.flowsrc, @@ -466,7 +461,6 @@ pflowioctl(struct ifnet *ifp, u_long cmd, caddr_t data) sizeof(struct sockaddr_in6), M_DEVBUF, M_NOWAIT)) == NULL) { splx(s); - rw_enter_write(&netlock); return (ENOMEM); } memcpy(sc->sc_flowsrc, &pflowr.flowsrc, @@ -490,7 +484,6 @@ pflowioctl(struct ifnet *ifp, u_long cmd, caddr_t data) &so, SOCK_DGRAM, 0); if (error) { splx(s); - rw_enter_write(&netlock); return (error); } if (pflowvalidsockaddr(sc->sc_flowsrc, 1)) { @@ -505,7 +498,6 @@ pflowioctl(struct ifnet *ifp, u_long cmd, caddr_t data) if (error) { soclose(so); splx(s); - rw_enter_write(&netlock); return (error); } } @@ -538,7 +530,6 @@ pflowioctl(struct ifnet *ifp, u_long cmd, caddr_t data) } else ifp->if_flags &= ~IFF_RUNNING; - rw_enter_write(&netlock); break; default: |