tcp: fix wraparound issue in tcp_lp
authorEric Dumazet <edumazet@google.com>
Mon, 1 May 2017 22:29:48 +0000 (15:29 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 26 Aug 2017 01:14:04 +0000 (02:14 +0100)
commite8f2dfc1abd41c9ebb93bf0af62ae80bcf5ddcf3
tree441449d59ec2ed12a26f9cba8ae38ed6641f4c7e
parent52c4c86e376899d418d789bf3ff4e4878de63a9b
tcp: fix wraparound issue in tcp_lp

commit a9f11f963a546fea9144f6a6d1a307e814a387e7 upstream.

Be careful when comparing tcp_time_stamp to some u32 quantity,
otherwise result can be surprising.

Fixes: 7c106d7e782b ("[TCP]: TCP Low Priority congestion control")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/ipv4/tcp_lp.c