From: David Miller <davem@davemloft.net>
To: alexander.h.duyck@intel.com
Cc: netdev@vger.kernel.org, jeffrey.t.kirsher@intel.com,
alexander.duyck@gmail.com
Subject: Re: [PATCH 1/2] tcp: Fix out of bounds access to tcpm_vals
Date: Wed, 11 Jul 2012 17:32:49 -0700 (PDT) [thread overview]
Message-ID: <20120711.173249.1303803416502735349.davem@davemloft.net> (raw)
In-Reply-To: <20120712001804.26542.2889.stgit@gitlad.jf.intel.com>
From: Alexander Duyck <alexander.h.duyck@intel.com>
Date: Wed, 11 Jul 2012 17:18:04 -0700
> 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>
Applied, thanks a lot.
How did you spot this, did you get a compiler warning?
I ask because while working on this, I at one point put the
tcp timestamp members after the metrics array in the
tcp_metrics_bucket struct. And I got a warning from gcc about
an array bounds violation that I could not figure out.
I am pretty certain this bug here is what it was warning about. And
the problem is that if you put the array at the end gcc doesn't warn
in order to handle things similar to what people use zero length
arrays for.
next prev parent reply other threads:[~2012-07-12 0:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` David Miller [this message]
2012-07-12 1:46 ` [PATCH 1/2] tcp: Fix out of bounds access to tcpm_vals Alexander Duyck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120711.173249.1303803416502735349.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=alexander.duyck@gmail.com \
--cc=alexander.h.duyck@intel.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).