From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: netdev@vger.kernel.org
Subject: Re: [Bug 8013] New: select for write hangs on a socket after write returned ECONNRESET
Date: Fri, 16 Feb 2007 10:29:14 -0800 [thread overview]
Message-ID: <20070216102914.7d4b34f0@freekitty> (raw)
In-Reply-To: <20070216161045.GA2371@2ka.mipt.ru>
On Fri, 16 Feb 2007 19:10:45 +0300
Evgeniy Polyakov <johnpol@2ka.mipt.ru> wrote:
> one of the possible fixes for select() after write() after ECONNRESET.
>
> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.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?
--
Stephen Hemminger <shemminger@linux-foundation.org>
next prev parent reply other threads:[~2007-02-16 18:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-16 0:04 Fw: [Bug 8013] New: select for write hangs on a socket after write returned ECONNRESET Stephen Hemminger
2007-02-16 15:25 ` Evgeniy Polyakov
2007-02-16 15:28 ` Evgeniy Polyakov
2007-02-16 15:39 ` Evgeniy Polyakov
2007-02-16 15:54 ` Evgeniy Polyakov
2007-02-16 16:10 ` Evgeniy Polyakov
2007-02-16 18:29 ` Stephen Hemminger [this message]
2007-02-16 18:34 ` Evgeniy Polyakov
2007-02-17 16:25 ` Evgeniy Polyakov
2007-02-19 14:19 ` Jarek Poplawski
2007-02-22 6:47 ` David Miller
2007-02-22 6:45 ` David Miller
2007-02-22 12:14 ` Evgeniy Polyakov
2007-02-22 13:31 ` David Miller
2007-02-22 13:46 ` Evgeniy Polyakov
2007-02-22 14:08 ` David Miller
2007-02-22 18:24 ` Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070216102914.7d4b34f0@freekitty \
--to=shemminger@linux-foundation.org \
--cc=johnpol@2ka.mipt.ru \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.