Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys Pull up following revision(s) (requested by roy in ti...
details: https://anonhg.NetBSD.org/src/rev/2060f642d7a2
branches: netbsd-8
changeset: 435044:2060f642d7a2
user: martin <martin%NetBSD.org@localhost>
date: Sat Jun 09 15:16:30 2018 +0000
description:
Pull up following revision(s) (requested by roy in ticket #868):
sys/sys/socketvar.h: revision 1.156
sys/kern/uipc_socket2.c: revision 1.130
sys/kern/uipc_socket.c: revision 1.264
Separate receive socket errors from general socket errors.
diffstat:
sys/kern/uipc_socket.c | 20 +++++++++++++-------
sys/kern/uipc_socket2.c | 6 +++---
sys/sys/socketvar.h | 3 ++-
3 files changed, 18 insertions(+), 11 deletions(-)
diffs (101 lines):
diff -r 454033580565 -r 2060f642d7a2 sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c Sat Jun 09 15:14:49 2018 +0000
+++ b/sys/kern/uipc_socket.c Sat Jun 09 15:16:30 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_socket.c,v 1.255.2.2 2018/04/09 13:34:10 bouyer Exp $ */
+/* $NetBSD: uipc_socket.c,v 1.255.2.3 2018/06/09 15:16:30 martin Exp $ */
/*-
* Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.255.2.2 2018/04/09 13:34:10 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.255.2.3 2018/06/09 15:16:30 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -1240,11 +1240,16 @@
if (m == NULL && so->so_rcv.sb_cc)
panic("receive 1");
#endif
- if (so->so_error) {
+ if (so->so_error || so->so_rerror) {
if (m != NULL)
goto dontblock;
- error = so->so_error;
- so->so_error = 0;
+ if (so->so_error) {
+ error = so->so_error;
+ so->so_error = 0;
+ } else {
+ error = so->so_rerror;
+ so->so_rerror = 0;
+ }
goto release;
}
if (so->so_state & SS_CANTRCVMORE) {
@@ -1564,7 +1569,8 @@
*/
while (flags & MSG_WAITALL && m == NULL && uio->uio_resid > 0 &&
!sosendallatonce(so) && !nextrecord) {
- if (so->so_error || so->so_state & SS_CANTRCVMORE)
+ if (so->so_error || so->so_rerror ||
+ so->so_state & SS_CANTRCVMORE)
break;
/*
* If we are peeking and the socket receive buffer is
@@ -2250,7 +2256,7 @@
kn->kn_flags |= EV_EOF;
kn->kn_fflags = so->so_error;
rv = 1;
- } else if (so->so_error)
+ } else if (so->so_error || so->so_rerror)
rv = 1;
else if (kn->kn_sfflags & NOTE_LOWAT)
rv = (kn->kn_data >= kn->kn_sdata);
diff -r 454033580565 -r 2060f642d7a2 sys/kern/uipc_socket2.c
--- a/sys/kern/uipc_socket2.c Sat Jun 09 15:14:49 2018 +0000
+++ b/sys/kern/uipc_socket2.c Sat Jun 09 15:16:30 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_socket2.c,v 1.124.8.1 2018/04/09 13:34:10 bouyer Exp $ */
+/* $NetBSD: uipc_socket2.c,v 1.124.8.2 2018/06/09 15:16:30 martin Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket2.c,v 1.124.8.1 2018/04/09 13:34:10 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket2.c,v 1.124.8.2 2018/06/09 15:16:30 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_mbuftrace.h"
@@ -504,7 +504,7 @@
KASSERT(solocked(so));
so->so_rcv.sb_overflowed++;
- so->so_error = ENOBUFS;
+ so->so_rerror = ENOBUFS;
sorwakeup(so);
}
diff -r 454033580565 -r 2060f642d7a2 sys/sys/socketvar.h
--- a/sys/sys/socketvar.h Sat Jun 09 15:14:49 2018 +0000
+++ b/sys/sys/socketvar.h Sat Jun 09 15:16:30 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: socketvar.h,v 1.144.6.2 2018/04/09 13:34:10 bouyer Exp $ */
+/* $NetBSD: socketvar.h,v 1.144.6.3 2018/06/09 15:16:30 martin Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -160,6 +160,7 @@
short so_qlimit; /* max number queued connections */
short so_timeo; /* connection timeout */
u_short so_error; /* error affecting connection */
+ u_short so_rerror; /* error affecting receiving */
u_short so_aborting; /* references from soabort() */
pid_t so_pgid; /* pgid for signals */
u_long so_oobmark; /* chars to oob mark */
Home |
Main Index |
Thread Index |
Old Index