linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Glauber Costa <glommer@parallels.com>
Cc: Nick Mathewson <nickm@freehaven.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Alexey Moiseytsev <himeraster@gmail.com>
Subject: Re: [BUG] Regression on behavior of EPOLLET | EPOLLIN for AF_UNIX sockets in 3.2
Date: Fri, 27 Jan 2012 19:55:06 +0100	[thread overview]
Message-ID: <1327690506.3159.7.camel@edumazet-laptop> (raw)
In-Reply-To: <4F22EA24.3030901@parallels.com>

Le vendredi 27 janvier 2012 à 22:17 +0400, Glauber Costa a écrit :
> On 01/27/2012 09:53 PM, Eric Dumazet wrote:
> > Le vendredi 27 janvier 2012 à 12:05 -0500, Nick Mathewson a écrit :
> >> [1.] One line summary of the problem:
> >>
> >
> > Hi
> >
> > Probably coming from commit 0884d7aa24e15e72b3c07f7da910a13bb7df3592
> > (AF_UNIX: Fix poll blocking problem when reading from a stream socket)
> >
> > When we requeue skb because not completely eaten, we call again
> >
> > sk->sk_data_ready(sk, skb->len);
> >
> For the record, I just confirmed this to be the case.

A fix would be to change unix_poll() and not call sk_data_ready() when
skb is requeued.

if (!skb_queue_empty(&sk->sk_receive_queue))
	mask |= POLLIN | POLLRDNORM;

Might be tricky if we want to keep unix_poll() lockless, but quite
possible.

Or... not dequeue skb from sk_received_queue unless fully consumed.



  reply	other threads:[~2012-01-27 18:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-27 17:05 [BUG] Regression on behavior of EPOLLET | EPOLLIN for AF_UNIX sockets in 3.2 Nick Mathewson
2012-01-27 17:53 ` Eric Dumazet
2012-01-27 18:17   ` Glauber Costa
2012-01-27 18:55     ` Eric Dumazet [this message]
2012-01-27 19:44       ` Eric Dumazet
2012-01-29  2:11   ` [PATCH] af_unix: fix EPOLLET regression for stream sockets Eric Dumazet
2012-01-30 17:45     ` David Miller

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=1327690506.3159.7.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=glommer@parallels.com \
    --cc=himeraster@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nickm@freehaven.net \
    /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).