]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: clear icsk_backoff in tcp_write_queue_purge()
authorEric Dumazet <edumazet@google.com>
Fri, 15 Feb 2019 21:36:20 +0000 (13:36 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 17 Feb 2019 23:46:58 +0000 (15:46 -0800)
commitc5813d924733ea4680d250ee16873f07a022c6c0
treefb25d7781f7faf8576f77965e3e586129da4b6aa
parentbb1033679c92f4bc98cf28d3b0b533a98e1a0596
tcp: clear icsk_backoff in tcp_write_queue_purge()

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>
net/ipv4/tcp.c