diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-09-05 07:59:12 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-09-05 07:59:12 +0000 |
commit | 2a513b0e402802492123dec3b333c832d280bba0 (patch) | |
tree | 663c225623f2c63581761ba2d134c7617fcf6a6b /sys | |
parent | 42d00f38a7bb037e8858f121842cb455800e6c51 (diff) |
Replace NET_ASSERT_LOCKED() by soassertlocked() in *_usrreq().
Not all of them need the NET_LOCK().
ok bluhm@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/rtsock.c | 4 | ||||
-rw-r--r-- | sys/netinet/ip_divert.c | 4 | ||||
-rw-r--r-- | sys/netinet/raw_ip.c | 4 | ||||
-rw-r--r-- | sys/netinet/tcp_usrreq.c | 4 | ||||
-rw-r--r-- | sys/netinet/udp_usrreq.c | 4 | ||||
-rw-r--r-- | sys/netinet6/ip6_divert.c | 4 | ||||
-rw-r--r-- | sys/netinet6/raw_ip6.c | 4 |
7 files changed, 15 insertions, 13 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 839f5cd9b60..b7ba9cd5d59 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtsock.c,v 1.249 2017/09/01 15:05:31 mpi Exp $ */ +/* $OpenBSD: rtsock.c,v 1.250 2017/09/05 07:59:11 mpi Exp $ */ /* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */ /* @@ -177,6 +177,8 @@ route_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, int af; int error = 0; + soassertlocked(so); + rop = sotoroutecb(so); if (rop == NULL) { m_freem(m); diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index 82b55806b7b..4233b01c936 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_divert.c,v 1.49 2017/07/27 12:04:42 mpi Exp $ */ +/* $OpenBSD: ip_divert.c,v 1.50 2017/09/05 07:59:11 mpi Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -248,7 +248,7 @@ divert_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *addr, struct inpcb *inp = sotoinpcb(so); int error = 0; - NET_ASSERT_LOCKED(); + soassertlocked(so); if (req == PRU_CONTROL) { return (in_control(so, (u_long)m, (caddr_t)addr, diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index 12e29c66a93..19d89af6da9 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: raw_ip.c,v 1.102 2017/09/01 15:05:31 mpi Exp $ */ +/* $OpenBSD: raw_ip.c,v 1.103 2017/09/05 07:59:11 mpi Exp $ */ /* $NetBSD: raw_ip.c,v 1.25 1996/02/18 18:58:33 christos Exp $ */ /* @@ -392,7 +392,7 @@ rip_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, struct inpcb *inp = sotoinpcb(so); int error = 0; - NET_ASSERT_LOCKED(); + soassertlocked(so); if (req == PRU_CONTROL) return (in_control(so, (u_long)m, (caddr_t)nam, diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index d4f92b471d4..1ff211b69ae 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_usrreq.c,v 1.154 2017/09/01 15:05:31 mpi Exp $ */ +/* $OpenBSD: tcp_usrreq.c,v 1.155 2017/09/05 07:59:11 mpi Exp $ */ /* $NetBSD: tcp_usrreq.c,v 1.20 1996/02/13 23:44:16 christos Exp $ */ /* @@ -131,7 +131,7 @@ tcp_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, int error = 0; short ostate; - NET_ASSERT_LOCKED(); + soassertlocked(so); if (req == PRU_CONTROL) { #ifdef INET6 diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 486b8d176e0..6d3916980b1 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udp_usrreq.c,v 1.239 2017/08/11 19:53:02 bluhm Exp $ */ +/* $OpenBSD: udp_usrreq.c,v 1.240 2017/09/05 07:59:11 mpi Exp $ */ /* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */ /* @@ -1060,7 +1060,7 @@ udp_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *addr, struct inpcb *inp; int error = 0; - NET_ASSERT_LOCKED(); + soassertlocked(so); if (req == PRU_CONTROL) { #ifdef INET6 diff --git a/sys/netinet6/ip6_divert.c b/sys/netinet6/ip6_divert.c index 1afdf9a5096..0ab1305684e 100644 --- a/sys/netinet6/ip6_divert.c +++ b/sys/netinet6/ip6_divert.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_divert.c,v 1.49 2017/07/27 12:04:42 mpi Exp $ */ +/* $OpenBSD: ip6_divert.c,v 1.50 2017/09/05 07:59:11 mpi Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -249,7 +249,7 @@ divert6_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *addr, struct inpcb *inp = sotoinpcb(so); int error = 0; - NET_ASSERT_LOCKED(); + soassertlocked(so); if (req == PRU_CONTROL) { return (in6_control(so, (u_long)m, (caddr_t)addr, diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c index 7a536033f66..d9777ba4674 100644 --- a/sys/netinet6/raw_ip6.c +++ b/sys/netinet6/raw_ip6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: raw_ip6.c,v 1.118 2017/09/01 15:05:31 mpi Exp $ */ +/* $OpenBSD: raw_ip6.c,v 1.119 2017/09/05 07:59:11 mpi Exp $ */ /* $KAME: raw_ip6.c,v 1.69 2001/03/04 15:55:44 itojun Exp $ */ /* @@ -570,7 +570,7 @@ rip6_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, struct inpcb *in6p = sotoinpcb(so); int error = 0; - NET_ASSERT_LOCKED(); + soassertlocked(so); if (req == PRU_CONTROL) return (in6_control(so, (u_long)m, (caddr_t)nam, |