Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern PR/54435: Valery Ushakov: Clear urgent status after...



details:   https://anonhg.NetBSD.org/src/rev/9a53c1796636
branches:  trunk
changeset: 969364:9a53c1796636
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Feb 18 00:40:50 2020 +0000

description:
PR/54435: Valery Ushakov: Clear urgent status after reading urgent data, so
that poll(2) works.

diffstat:

 sys/kern/uipc_socket.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 36cc3d43beff -r 9a53c1796636 sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c    Mon Feb 17 22:52:18 2020 +0000
+++ b/sys/kern/uipc_socket.c    Tue Feb 18 00:40:50 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_socket.c,v 1.285 2019/10/14 16:27:03 maxv Exp $   */
+/*     $NetBSD: uipc_socket.c,v 1.286 2020/02/18 00:40:50 christos 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.285 2019/10/14 16:27:03 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.286 2020/02/18 00:40:50 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -1180,6 +1180,9 @@
                            MIN(uio->uio_resid, m->m_len), uio);
                        m = m_free(m);
                } while (uio->uio_resid > 0 && error == 0 && m);
+               /* We consumed the oob data, no more oobmark.  */
+               so->so_oobmark = 0;
+               so->so_state &= ~SS_RCVATMARK;
 bad:
                if (m != NULL)
                        m_freem(m);



Home | Main Index | Thread Index | Old Index