lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 16 Feb 2007 21:34:27 +0300
From:	Evgeniy Polyakov <johnpol@....mipt.ru>
To:	Stephen Hemminger <shemminger@...ux-foundation.org>
Cc:	netdev@...r.kernel.org
Subject: Re: [Bug 8013] New: select for write hangs on a socket after write returned ECONNRESET

On Fri, Feb 16, 2007 at 10:29:14AM -0800, Stephen Hemminger (shemminger@...ux-foundation.org) wrote:
> On Fri, 16 Feb 2007 19:10:45 +0300
> Evgeniy Polyakov <johnpol@....mipt.ru> wrote:
> 
> > one of the possible fixes for select() after write() after ECONNRESET.
> > 
> > Signed-off-by: Evgeniy Polyakov <johnpol@....mipt.ru>
> > 
> > diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
> > index b67e0dd..661ca0c 100644
> > --- a/net/ipv4/tcp.c
> > +++ b/net/ipv4/tcp.c
> > @@ -365,7 +365,7 @@ unsigned int tcp_poll(struct file *file, struct socket *sock, poll_table *wait)
> >  	 * blocking on fresh not-connected or disconnected socket. --ANK
> >  	 */
> >  	if (sk->sk_shutdown == SHUTDOWN_MASK || sk->sk_state == TCP_CLOSE)
> > -		mask |= POLLHUP;
> > +		mask |= POLLHUP | POLLERR;
> >  	if (sk->sk_shutdown & RCV_SHUTDOWN)
> >  		mask |= POLLIN | POLLRDNORM | POLLRDHUP;
> >  
> > 
> 
> No, that would end up setting error bit on normal shutdown. This is incorrect 
> behaviour and might even be described in SUSE standard.
> 
> There might even be LSB tests on this?

Maybe - I do not have it handy.
Otherwise we can extend select output mask to include hungup too
(getting into account that hungup is actually output event).

> -- 
> Stephen Hemminger <shemminger@...ux-foundation.org>

-- 
	Evgeniy Polyakov
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ