All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] tcp: Fix out of bounds access to tcpm_vals
@ 2012-07-12  0:18 Alexander Duyck
  2012-07-12  0:18 ` [PATCH 2/2] net: Update alloc frag to reduce get/put page usage and recycle pages Alexander Duyck
  2012-07-12  0:32 ` [PATCH 1/2] tcp: Fix out of bounds access to tcpm_vals David Miller
  0 siblings, 2 replies; 9+ messages in thread
From: Alexander Duyck @ 2012-07-12  0:18 UTC (permalink / raw)
  To: netdev; +Cc: davem, jeffrey.t.kirsher, alexander.duyck, Alexander Duyck

The recent patch "tcp: Maintain dynamic metrics in local cache." introduced
an out of bounds access due to what appears to be a typo.   I believe this
change should resolve the issue by replacing the access to RTAX_CWND with
TCP_METRIC_CWND.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
---

 net/ipv4/tcp_metrics.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c
index 1fd83d3..5a38a2d 100644
--- a/net/ipv4/tcp_metrics.c
+++ b/net/ipv4/tcp_metrics.c
@@ -412,7 +412,7 @@ 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] 9+ messages in thread

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

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-12  0:18 [PATCH 1/2] tcp: Fix out of bounds access to tcpm_vals Alexander Duyck
2012-07-12  0:18 ` [PATCH 2/2] net: Update alloc frag to reduce get/put page usage and recycle pages Alexander Duyck
2012-07-12  0:29   ` Eric Dumazet
2012-07-12  1:11     ` David Miller
2012-07-12  2:02     ` Alexander Duyck
2012-07-12  5:06       ` Eric Dumazet
2012-07-12 15:33         ` Alexander Duyck
2012-07-12  0:32 ` [PATCH 1/2] tcp: Fix out of bounds access to tcpm_vals David Miller
2012-07-12  1:46   ` Alexander Duyck

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.