tcp: update a call to tcp_metric_set()
Subsystems (4)
PATCH 1/1 tcp: update a call to tcp_metric_set()
We changed how the metrics were stored so RTAX_CWND needs to be changed to TCP_METRIC_CWND or it leads to write past the end of the ->tcpm_vals[] array.
Signed-off-by Dan Carpenter <[email protected]>
net/ipv4/tcp_metrics.c +2 -1
@@ -412,7 +412,8 @@ void tcp_update_metrics(struct sock *sk) max(tp->snd_cwnd >> 1, tp->snd_ssthresh));if (!tcp_metric_locked (tm,TCP_METRIC_CWND )) { val =tcp_metric_get (tm,TCP_METRIC_CWND ); -tcp_metric_set (tm,RTAX_CWND , (val + tp->snd_cwnd) >>1 ); +tcp_metric_set (tm,TCP_METRIC_CWND , + (val + tp->snd_cwnd) >>1 ); } }else {/* Else slow start did not finish, cwnd is non-sense,
David Miller
maintainerFrom: Dan Carpenter <[email protected]>
Date: Thu, 12 Jul 2012 17:46:38 +0300
Quoted 5 lines
We changed how the metrics were stored so
RTAX_CWNDneeds to be changed toTCP_METRIC_CWNDor it leads to write past the end of the ->tcpm_vals[] array.Signed-off-by Dan Carpenter <[email protected]>
Update your tree, this is already fixed.