NetBSD-Bugs archive

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

Re: kern/54435 (reading TCP urgent data with MSG_OOB doesn't clear poll(2) status)



The following reply was made to PR kern/54435; it has been noted by GNATS.

From: Rin Okuyama <rokuyama.rk%gmail.com@localhost>
To: "gnats-bugs%NetBSD.org@localhost" <gnats-bugs%NetBSD.org@localhost>
Cc: Christos Zoulas <christos%astron.com@localhost>
Subject: Re: kern/54435 (reading TCP urgent data with MSG_OOB doesn't clear
 poll(2) status)
Date: Sun, 3 May 2020 23:34:49 +0900

 On 2020/02/18 9:40, Christos Zoulas wrote:
 > 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
 
 ...
 
 > 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
 ...
 > @@ -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);
 > 
 
 This breaks rlogin. When both server and client run on recent NetBSD,
 session freezes by hitting ^C:
 
 ---
 % rlogin localhost
 rlogin: rcmd: connect to address ::1: Connection refused
 Trying 127.0.0.1...
 Last login: Sun May  3 21:39:37 2020 from localhost on pts/4
 ...
 % cat
 (^C then session freezes and does not respond any input)
 ---
 
 Reverting this commit makes ^C working again as expected.
 
 Thanks,
 rin
 


Home | Main Index | Thread Index | Old Index