Module Name:    src
Committed By:   christos
Date:           Tue Feb 18 00:40:50 UTC 2020

Modified Files:
        src/sys/kern: uipc_socket.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.285 -r1.286 src/sys/kern/uipc_socket.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/uipc_socket.c
diff -u src/sys/kern/uipc_socket.c:1.285 src/sys/kern/uipc_socket.c:1.286
--- src/sys/kern/uipc_socket.c:1.285	Mon Oct 14 12:27:03 2019
+++ src/sys/kern/uipc_socket.c	Mon Feb 17 19:40:50 2020
@@ -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 @@ soreceive(struct socket *so, struct mbuf
 			    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);

Reply via email to