diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2002-06-11 05:07:44 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2002-06-11 05:07:44 +0000 |
commit | 00f0d68136b1e890befc8718a5c109561ede3567 (patch) | |
tree | f42d022dbd5dda9fa6e5fcc518144e67041b68ee /sys/kern | |
parent | 4838ea02e96bfaa13fcac1bb72f6239f9a390455 (diff) |
splassert where necessary
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/uipc_socket.c | 12 | ||||
-rw-r--r-- | sys/kern/uipc_socket2.c | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index ee0467e0a67..8db7ad86888 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket.c,v 1.42 2002/05/11 00:06:33 deraadt Exp $ */ +/* $OpenBSD: uipc_socket.c,v 1.43 2002/06/11 05:07:43 art Exp $ */ /* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */ /* @@ -184,9 +184,9 @@ solisten(so, backlog) */ void -sofree(so) - register struct socket *so; +sofree(struct socket *so) { + splassert(IPL_SOFTNET); if (so->so_pcb || (so->so_state & SS_NOFDREF) == 0) return; @@ -265,12 +265,12 @@ discard: } /* - * Must be called at splsoftnet... + * Must be called at splsoftnet. */ int -soabort(so) - struct socket *so; +soabort(struct socket *so) { + splassert(IPL_SOFTNET); return (*so->so_proto->pr_usrreq)(so, PRU_ABORT, NULL, NULL, NULL); } diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c index ce11cc5c775..1d88395486f 100644 --- a/sys/kern/uipc_socket2.c +++ b/sys/kern/uipc_socket2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket2.c,v 1.26 2002/05/11 00:06:33 deraadt Exp $ */ +/* $OpenBSD: uipc_socket2.c,v 1.27 2002/06/11 05:07:43 art Exp $ */ /* $NetBSD: uipc_socket2.c,v 1.11 1996/02/04 02:17:55 christos Exp $ */ /* @@ -154,13 +154,13 @@ soisdisconnected(so) * Must be called at splsoftnet() */ struct socket * -sonewconn(head, connstatus) - struct socket *head; - int connstatus; +sonewconn(struct socket *head, int connstatus) { struct socket *so; int soqueue = connstatus ? 1 : 0; + splassert(IPL_SOFTNET); + if (head->so_qlen + head->so_q0len > head->so_qlimit * 3) return ((struct socket *)0); so = pool_get(&socket_pool, PR_NOWAIT); |