Message ID | 20200128135819.645013996@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=oJ2n=3R=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19393C33CB2 for <stable@archiver.kernel.org>; Tue, 28 Jan 2020 14:49:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D6714207FD for <stable@archiver.kernel.org>; Tue, 28 Jan 2020 14:49:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580222953; bh=FOymezN0+rszGiqGtcZMvNDMUOJdpY95f/4GU2ohRL0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=QMhGXTl31GZBO6HWyeRrYsaMfwU5Byyeq0Qdjc9+CN5jTLbm0cw3bn+9CK71Vh4a+ kVuQ1+gGE3CasFBXP/PmGZ36ks9FN6/EUqneHEGrkYcvYOSHhzDnv2LLyYG5R/5fuU x8996U/nRqpdpRVcfVYv1iNUrDZXtTp0mr3cQUZs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727500AbgA1OBl (ORCPT <rfc822;stable@archiver.kernel.org>); Tue, 28 Jan 2020 09:01:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:47794 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727495AbgA1OBk (ORCPT <rfc822;stable@vger.kernel.org>); Tue, 28 Jan 2020 09:01:40 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2C89024685; Tue, 28 Jan 2020 14:01:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580220099; bh=FOymezN0+rszGiqGtcZMvNDMUOJdpY95f/4GU2ohRL0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NdCEH/um6zqTiCJ3fJ0kCi36QMuEHNWaRk/LljL9FvfvsLN/FCJUYgRbx7KmLSne/ 45SyIwnmIDQubyYz/bkTpFxCrcP0HVoIf9BXJeTqYu+7KjMHCsmYanbVVfF9w5S+wu oNMVPOmL0/3BtBbMtOou+t1kGwh//2K0Bse/XZ64= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Eric Dumazet <edumazet@google.com>, Cambda Zhu <cambda@linux.alibaba.com>, Yuchung Cheng <ycheng@google.com>, Neal Cardwell <ncardwell@google.com>, "David S. Miller" <davem@davemloft.net> Subject: [PATCH 5.4 017/104] tcp: do not leave dangling pointers in tp->highest_sack Date: Tue, 28 Jan 2020 14:59:38 +0100 Message-Id: <20200128135819.645013996@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135817.238524998@linuxfoundation.org> References: <20200128135817.238524998@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -2520,6 +2520,7 @@ static void tcp_rtx_queue_purge(struct s { struct rb_node *p = rb_first(&sk->tcp_rtx_queue); + tcp_sk(sk)->highest_sack = NULL; while (p) { struct sk_buff *skb = rb_to_skb(p); --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -3164,6 +3164,7 @@ static int tcp_clean_rtx_queue(struct so tp->retransmit_skb_hint = NULL; if (unlikely(skb == tp->lost_skb_hint)) tp->lost_skb_hint = NULL; + tcp_highest_sack_replace(sk, skb, next); tcp_rtx_queue_unlink_and_free(skb, sk); } --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -3231,6 +3231,7 @@ int tcp_send_synack(struct sock *sk) if (!nskb) return -ENOMEM; INIT_LIST_HEAD(&nskb->tcp_tsorted_anchor); + tcp_highest_sack_replace(sk, skb, nskb); tcp_rtx_queue_unlink_and_free(skb, sk); __skb_header_release(nskb); tcp_rbtree_insert(&sk->tcp_rtx_queue, nskb);