diff options
| author | 2018-04-24 15:40:55 +0000 | |
|---|---|---|
| committer | 2018-04-24 15:40:55 +0000 | |
| commit | cb8644c1e17bc17a06f421baafe315a5eae6bd46 (patch) | |
| tree | 6ed61b212bec6c02c4bde15274c99c3ae78030dd /sys/netinet/tcp_usrreq.c | |
| parent | make the check for XSAVE the same as it is later in the file, for (diff) | |
| download | wireguard-openbsd-cb8644c1e17bc17a06f421baafe315a5eae6bd46.tar.xz wireguard-openbsd-cb8644c1e17bc17a06f421baafe315a5eae6bd46.zip | |
Push NET_LOCK down in the default ifioctl case.
For the PRU_CONTROL bit the NET_LOCK surrounds in[6]_control() and
on the ENOTSUPP case we guard the driver if_ioctl functions.
OK mpi@
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
| -rw-r--r-- | sys/netinet/tcp_usrreq.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index cd7f7e398dd..6b1e036b574 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_usrreq.c,v 1.167 2018/02/05 14:53:26 bluhm Exp $ */ +/* $OpenBSD: tcp_usrreq.c,v 1.168 2018/04/24 15:40:55 pirofti Exp $ */ /* $NetBSD: tcp_usrreq.c,v 1.20 1996/02/13 23:44:16 christos Exp $ */ /* @@ -131,8 +131,6 @@ tcp_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, int error = 0; short ostate; - soassertlocked(so); - if (req == PRU_CONTROL) { #ifdef INET6 if (sotopf(so) == PF_INET6) @@ -143,6 +141,9 @@ tcp_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, return (in_control(so, (u_long)m, (caddr_t)nam, (struct ifnet *)control)); } + + soassertlocked(so); + if (control && control->m_len) { m_freem(control); m_freem(m); |
