提交 1d57f195 编写于 作者: E Eric Dumazet 提交者: David S. Miller

tcp: fix regression in urgent data handling

Stephan Springl found that commit 1402d366 "tcp: introduce
tcp_try_coalesce" introduced a regression for rlogin

It turns out problem comes from TCP urgent data handling and
a change in behavior in input path.

rlogin sends two one-byte packets with URG ptr set, and when next data
frame is coalesced, we lack sk_data_ready() calls to wakeup consumer.
Signed-off-by: NEric Dumazet <edumazet@google.com>
Reported-by: NStephan Springl <springl-k@lar.bfw.de>
Cc: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 0e698bf6
......@@ -4661,7 +4661,7 @@ static void tcp_data_queue(struct sock *sk, struct sk_buff *skb)
if (eaten > 0)
kfree_skb_partial(skb, fragstolen);
else if (!sock_flag(sk, SOCK_DEAD))
if (!sock_flag(sk, SOCK_DEAD))
sk->sk_data_ready(sk, 0);
return;
}
......@@ -5556,8 +5556,7 @@ int tcp_rcv_established(struct sock *sk, struct sk_buff *skb,
#endif
if (eaten)
kfree_skb_partial(skb, fragstolen);
else
sk->sk_data_ready(sk, 0);
sk->sk_data_ready(sk, 0);
return 0;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册