[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1429729940.18561.133.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Wed, 22 Apr 2015 12:12:20 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Miller <davem@...emloft.net>
Cc: johunt@...mai.com, netdev@...r.kernel.org, edumazet@...gle.com,
gthelen@...gle.com, rientjes@...gle.com
Subject: Re: [PATCH net] tcp: fix possible deadlock in tcp_send_fin()
On Wed, 2015-04-22 at 14:50 -0400, David Miller wrote:
> From: Eric Dumazet <eric.dumazet@...il.com>
> Date: Wed, 22 Apr 2015 11:39:27 -0700
>
> > Note that in the unlikely case skb can not be allocated,
> > if an already transmitted packet is in the write queue, we also can OR
> > the FIN flag on it, and rely on normal rtx to deliver this FIN later.
> >
> > I'll cook a patch when net-next reopens.
>
> Hmmm, we already check for something like this at the beginning of
> tcp_send_fin(), I know because I added that piece of code 15+ years
> ago :-)
>
> Or are you suggesting something slightly different?
The existing test does the OR only if there is an unsent frame in the
write queue.
Because if the frame present in write queue was already sent, we prefer
cooking a fresh skb to be able to send it right now (disabling Nagle
checks)
So, in the case we cannot allocate the skb, we can still add the FIN
flag, but not push any frame right now.
FIN will be sent later, because incoming ACK or rtx will eventually send
it.
This sounds better than not sending FIN at all.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists