From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: leonardo.lists@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH] net: add POLLPRI to sock_def_readable()
Date: Thu, 06 Jan 2011 10:55:00 -0800 (PST) [thread overview]
Message-ID: <20110106.105500.71107144.davem@davemloft.net> (raw)
In-Reply-To: <1294335897.3074.83.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 06 Jan 2011 18:44:57 +0100
> Leonardo Chiquitto found poll() could block forever on tcp sockets and
> Urgent data was received, if the event flag only contains POLLPRI.
>
> He did a bisection and found commit 4938d7e0233 (poll: avoid extra
> wakeups in select/poll) was the source of the problem.
>
> Problem is TCP sockets use standard sock_def_readable() function for
> their sk_data_ready() handler, and sock_def_readable() doesnt signal
> POLLPRI.
>
> Only TCP is affected by the problem. Adding POLLPRI to the list of flags
> might trigger unnecessary schedules, but URGENT handling is such a
> seldom used feature this seems a good compromise.
>
> Thanks a lot to Leonardo for providing the bisection result and a test
> program as well.
>
> Reference : http://www.spinics.net/lists/netdev/msg151793.html
>
> Reported-and-bisected-by: Leonardo Chiquitto <leonardo.lists@gmail.com>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> Tested-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied, thanks everyone.
prev parent reply other threads:[~2011-01-06 18:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-06 15:50 POLLPRI/poll() behavior change since 2.6.31 Leonardo Chiquitto
2011-01-06 16:55 ` Eric Dumazet
2011-01-06 18:10 ` Leonardo Chiquitto
2011-01-06 22:40 ` Davide Libenzi
2011-01-07 13:31 ` Eric Dumazet
2011-01-06 17:44 ` [PATCH] net: add POLLPRI to sock_def_readable() Eric Dumazet
2011-01-06 18:55 ` David Miller [this message]
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=20110106.105500.71107144.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=leonardo.lists@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).