From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] net_sched: fq: take care of throttled flows before reuse Date: Wed, 02 May 2018 16:38:43 -0400 (EDT) Message-ID: <20180502.163843.341515555134127800.davem@davemloft.net> References: <20180502170330.55458-1-edumazet@google.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com To: edumazet@google.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:37396 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751004AbeEBUip (ORCPT ); Wed, 2 May 2018 16:38:45 -0400 In-Reply-To: <20180502170330.55458-1-edumazet@google.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Eric Dumazet Date: Wed, 2 May 2018 10:03:30 -0700 > Normally, a socket can not be freed/reused unless all its TX packets > left qdisc and were TX-completed. However connect(AF_UNSPEC) allows > this to happen. > > With commit fc59d5bdf1e3 ("pkt_sched: fq: clear time_next_packet for > reused flows") we cleared f->time_next_packet but took no special > action if the flow was still in the throttled rb-tree. > > Since f->time_next_packet is the key used in the rb-tree searches, > blindly clearing it might break rb-tree integrity. We need to make > sure the flow is no longer in the rb-tree to avoid this problem. > > Fixes: fc59d5bdf1e3 ("pkt_sched: fq: clear time_next_packet for reused flows") > Signed-off-by: Eric Dumazet Applied and queued up for -stable, thanks Eric.