Commit 1cf39b5f authored by Eric Dumazet's avatar Eric Dumazet Committed by Luis Henriques

net: skb_fclone_busy() needs to detect orphaned skb

commit 39bb5e62 upstream.

Some drivers are unable to perform TX completions in a bound time.
They instead call skb_orphan()

Problem is skb_fclone_busy() has to detect this case, otherwise
we block TCP retransmits and can freeze unlucky tcp sessions on
mostly idle hosts.
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Fixes: 1f3279ae ("tcp: avoid retransmits of TCP packets hanging in host queues")
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
[ luis: backport to 3.16 provided by Eric Dumzet ]
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent fea6ccb6
......@@ -2082,7 +2082,8 @@ static bool skb_still_in_host_queue(const struct sock *sk,
const struct sk_buff *fclone = skb + 1;
if (unlikely(skb->fclone == SKB_FCLONE_ORIG &&
fclone->fclone == SKB_FCLONE_CLONE)) {
fclone->fclone == SKB_FCLONE_CLONE &&
fclone->sk == sk)) {
NET_INC_STATS_BH(sock_net(sk),
LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES);
return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment