]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: avoid oops in tcp_metrics and reset tcpm_stamp
authorJulian Anastasov <ja@ssi.bg>
Mon, 23 Jul 2012 07:46:38 +0000 (10:46 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 Jul 2012 07:57:12 +0000 (00:57 -0700)
commitbfa0dc432949defb3c55841e4cc8d0a4da161c44
treede744eaedb4c0942fab7d0c6af583460b2803fa0
parent0be52523f75ca6d1adacd875cfeadccbd6edc020
tcp: avoid oops in tcp_metrics and reset tcpm_stamp

In tcp_tw_remember_stamp we incorrectly checked tw
instead of tm, it can lead to oops if the cached entry is
not found.

tcpm_stamp was not updated in tcpm_check_stamp when
tcpm_suck_dst was called, move the update into tcpm_suck_dst,
so that we do not call it infinitely on every next cache hit
after TCP_METRICS_TIMEOUT.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_metrics.c