On 2017-03-30 12:18, Eric Dumazet wrote:
> On Thu, 2017-03-30 at 11:55 +0900, Seiichi Ikarashi wrote:
>
>> I got a report that receiving a RST packet but poll() got only POLLERR, no
>> POLLIN|POLLRDHUP .
>> It was an old x86_64 kernel which does not include sk_state_{load,store}
>> functions.
>>
On Thu, 2017-03-30 at 11:55 +0900, Seiichi Ikarashi wrote:
> I got a report that receiving a RST packet but poll() got only POLLERR, no
> POLLIN|POLLRDHUP .
> It was an old x86_64 kernel which does not include sk_state_{load,store}
> functions.
> I suspected some race might have occur above.
It
Hi Eric,
On 2017-03-30 11:31, Eric Dumazet wrote:
> On Thu, 2017-03-30 at 09:35 +0900, Seiichi Ikarashi wrote:
>> Similar to a4d258036ed9 ("tcp: Fix race in tcp_poll").
>>
>> Between receiving a packet and tcp_poll(), sk->sk_err is protected by memory
>> barriers but
>> sk->sk_shutdown and sk->sk
On Thu, 2017-03-30 at 09:35 +0900, Seiichi Ikarashi wrote:
> Similar to a4d258036ed9 ("tcp: Fix race in tcp_poll").
>
> Between receiving a packet and tcp_poll(), sk->sk_err is protected by memory
> barriers but
> sk->sk_shutdown and sk->sk_state are not.
...
> So possibly, POLLIN|POLLRDNORM|P
Similar to a4d258036ed9 ("tcp: Fix race in tcp_poll").
Between receiving a packet and tcp_poll(), sk->sk_err is protected by memory
barriers but
sk->sk_shutdown and sk->sk_state are not. So possibly,
POLLIN|POLLRDNORM|POLLRDHUP might
not be set even when receiving a RST packet.
Signed-off-by: S
Thanks Sergei!
On 2017-03-29 20:57, Sergei Shtylyov wrote:
> Hello!
>
> On 3/29/2017 8:22 AM, Seiichi Ikarashi wrote:
>
>> Similar to commit a4d258036ed9b2a1811.
>
>Commit citing is standardized: it should specify 12-digit (at least) SHA1
> and the commit summary line enclosed in ("").
>
Hello!
On 3/29/2017 8:22 AM, Seiichi Ikarashi wrote:
Similar to commit a4d258036ed9b2a1811.
Commit citing is standardized: it should specify 12-digit (at least) SHA1
and the commit summary line enclosed in ("").
Between receiving a packet and tcp_poll(), sk->sk_err is protected by memo
Similar to commit a4d258036ed9b2a1811.
Between receiving a packet and tcp_poll(), sk->sk_err is protected by memory
barriers but
sk->sk_shutdown and sk->sk_state are not. So possibly,
POLLIN|POLLRDNORM|POLLRDHUP might
not be set even when receiving a RST packet.
Signed-off-by: Seiichi Ikarashi