summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_usrreq.c
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2018-01-09 15:14:23 +0000
committermpi <mpi@openbsd.org>2018-01-09 15:14:23 +0000
commit69dc22ffae4c8d27b6c8f9bd485b31751844294b (patch)
tree9aec10677446501355f63318cb88b5c4ed31500b /sys/netinet/tcp_usrreq.c
parentlock->ctx != NULL => lock->ctx (diff)
downloadwireguard-openbsd-69dc22ffae4c8d27b6c8f9bd485b31751844294b.tar.xz
wireguard-openbsd-69dc22ffae4c8d27b6c8f9bd485b31751844294b.zip
Change `so_state' and `so_error' to unsigned int such that they can
be atomically read from any context. ok bluhm@, visa@
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
-rw-r--r--sys/netinet/tcp_usrreq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 02fdf2069f1..cc2b23e0661 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_usrreq.c,v 1.162 2017/12/01 10:33:33 bluhm Exp $ */
+/* $OpenBSD: tcp_usrreq.c,v 1.163 2018/01/09 15:14:23 mpi Exp $ */
/* $NetBSD: tcp_usrreq.c,v 1.20 1996/02/13 23:44:16 christos Exp $ */
/*
@@ -583,7 +583,7 @@ tcp_attach(struct socket *so, int proto)
inp = sotoinpcb(so);
tp = tcp_newtcpcb(inp);
if (tp == NULL) {
- int nofd = so->so_state & SS_NOFDREF; /* XXX */
+ unsigned int nofd = so->so_state & SS_NOFDREF; /* XXX */
so->so_state &= ~SS_NOFDREF; /* don't free the socket yet */
in_pcbdetach(inp);