diff options
author | 2016-11-21 09:09:06 +0000 | |
---|---|---|
committer | 2016-11-21 09:09:06 +0000 | |
commit | c0a948f7c8b9efc397a8fe27dfddb23b9526a162 (patch) | |
tree | be004bac1aba024cc718164e63e5804d134a229d /sys/kern/uipc_socket.c | |
parent | Include the OFP header of the message that caused the error on error (diff) | |
download | wireguard-openbsd-c0a948f7c8b9efc397a8fe27dfddb23b9526a162.tar.xz wireguard-openbsd-c0a948f7c8b9efc397a8fe27dfddb23b9526a162.zip |
Enforce that pr_usrreq functions are called at IPL_SOFTNET.
This will allow us to keep locking simple as soon as we trade
splsoftnet() for a rwlock.
ok bluhm@, claudio@
Diffstat (limited to 'sys/kern/uipc_socket.c')
-rw-r--r-- | sys/kern/uipc_socket.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 12edabecfbd..81c6c6d4b5e 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket.c,v 1.164 2016/11/14 08:45:30 mpi Exp $ */ +/* $OpenBSD: uipc_socket.c,v 1.165 2016/11/21 09:09:06 mpi Exp $ */ /* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */ /* @@ -652,8 +652,10 @@ soreceive(struct socket *so, struct mbuf **paddr, struct uio *uio, flags |= MSG_DONTWAIT; if (flags & MSG_OOB) { m = m_get(M_WAIT, MT_DATA); + s = splsoftnet(); error = (*pr->pr_usrreq)(so, PRU_RCVOOB, m, (struct mbuf *)(long)(flags & MSG_PEEK), NULL, curproc); + splx(s); if (error) goto bad; do { |