All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch -next] tcp: update a call to tcp_metric_set()
@ 2012-07-12 14:46 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2012-07-12 14:46 UTC (permalink / raw)
  To: David S. Miller
  Cc: Alexey Kuznetsov, James Morris, Hideaki YOSHIFUJI,
	Patrick McHardy, netdev, kernel-janitors

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 <dan.carpenter@oracle.com>

diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c
index 1fd83d3..c6b0f20 100644
--- a/net/ipv4/tcp_metrics.c
+++ b/net/ipv4/tcp_metrics.c
@@ -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,

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [patch -next] tcp: update a call to tcp_metric_set()
@ 2012-07-12 14:46 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2012-07-12 14:46 UTC (permalink / raw)
  To: David S. Miller
  Cc: Alexey Kuznetsov, James Morris, Hideaki YOSHIFUJI,
	Patrick McHardy, netdev, kernel-janitors

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 <dan.carpenter@oracle.com>

diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c
index 1fd83d3..c6b0f20 100644
--- a/net/ipv4/tcp_metrics.c
+++ b/net/ipv4/tcp_metrics.c
@@ -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,

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [patch -next] tcp: update a call to tcp_metric_set()
  2012-07-12 14:46 ` Dan Carpenter
@ 2012-07-12 14:50   ` David Miller
  -1 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2012-07-12 14:50 UTC (permalink / raw)
  To: dan.carpenter; +Cc: kuznet, jmorris, yoshfuji, kaber, netdev, kernel-janitors

From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Thu, 12 Jul 2012 17:46:38 +0300

> 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 <dan.carpenter@oracle.com>

Update your tree, this is already fixed.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch -next] tcp: update a call to tcp_metric_set()
@ 2012-07-12 14:50   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2012-07-12 14:50 UTC (permalink / raw)
  To: dan.carpenter; +Cc: kuznet, jmorris, yoshfuji, kaber, netdev, kernel-janitors

From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Thu, 12 Jul 2012 17:46:38 +0300

> 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 <dan.carpenter@oracle.com>

Update your tree, this is already fixed.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-07-12 14:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-12 14:46 [patch -next] tcp: update a call to tcp_metric_set() Dan Carpenter
2012-07-12 14:46 ` Dan Carpenter
2012-07-12 14:50 ` David Miller
2012-07-12 14:50   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.