diff options
author | Eric Dumazet <edumazet@google.com> | 2019-02-16 00:36:20 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-02-23 11:05:59 +0300 |
commit | 1f52cfe301917f6244228cd59cdb79dca2ba53fc (patch) | |
tree | 30285d736afe2d35953f34f58a53480e083b02a3 /include/net/tcp.h | |
parent | 8b4ceed57a167b6852c731b12e8dc46bc840ea8a (diff) | |
download | linux-1f52cfe301917f6244228cd59cdb79dca2ba53fc.tar.xz |
tcp: clear icsk_backoff in tcp_write_queue_purge()
[ Upstream commit 04c03114be82194d4a4858d41dba8e286ad1787c ]
soukjin bae reported a crash in tcp_v4_err() handling
ICMP_DEST_UNREACH after tcp_write_queue_head(sk)
returned a NULL pointer.
Current logic should have prevented this :
if (seq != tp->snd_una || !icsk->icsk_retransmits ||
!icsk->icsk_backoff || fastopen)
break;
Problem is the write queue might have been purged
and icsk_backoff has not been cleared.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: soukjin bae <soukjin.bae@samsung.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r-- | include/net/tcp.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index c3f4f6a9e6c3..fed2a78fb8cb 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1526,6 +1526,7 @@ static inline void tcp_write_queue_purge(struct sock *sk) sk_wmem_free_skb(sk, skb); sk_mem_reclaim(sk); tcp_clear_all_retrans_hints(tcp_sk(sk)); + inet_csk(sk)->icsk_backoff = 0; } static inline struct sk_buff *tcp_write_queue_head(const struct sock *sk) |