From: "Vegard Nossum" <vegard.nossum@gmail.com>
To: "Mattias Nissler" <mattias.nissler@gmx.de>,
"Stefano Brivio" <stefano.brivio@polimi.it>,
"John W. Linville" <linville@tuxdriver.com>,
"David S. Miller" <davem@davemloft.net>
Cc: "Ingo Molnar" <mingo@elte.hu>,
"Pekka Enberg" <penberg@cs.helsinki.fi>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Use of uninitialized memory in rate_control_pid_alloc()
Date: Mon, 7 Jul 2008 13:27:58 +0200 [thread overview]
Message-ID: <19f34abd0807070427w5398c617uae0a4e8e40fd8f0e@mail.gmail.com> (raw)
Hi,
kmemcheck found this in next-20080704:
This patch:
commit 1946b74ce03c4edecabde80d027da00a7eab56ca
Author: Mattias Nissler <mattias.nissler@gmx.de>
Date: Thu Dec 20 13:27:26 2007 +0100
rc80211-pid: export tuning parameters through debugfs
contained this hunk (net/mac80211/rc80211_pid_algo.c):
@@ -363,10 +375,10 @@ static void *rate_control_pid_alloc(struct ieee80211_local
for (i = 0; i < mode->num_rates; i++) {
rinfo[i].index = i;
rinfo[i].rev_index = i;
- if (RC_PID_FAST_START)
+ if (pinfo->fast_start)
rinfo[i].diff = 0;
else
- rinfo[i].diff = i * RC_PID_NORM_OFFSET;
+ rinfo[i].diff = i * pinfo->norm_offset;
}
for (i = 1; i < mode->num_rates; i++) {
s = 0;
which is obviously wrong, since "pinfo" is allocated just above and
has never been initialized.
It seems that this is present (unfixed) in mainline as well.
Vegard
--
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
-- E. W. Dijkstra, EWD1036
next reply other threads:[~2008-07-07 11:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-07 11:27 Vegard Nossum [this message]
2008-07-07 20:23 ` [PATCH] rc80211_pid: Fix fast_start parameter handling Mattias Nissler
2008-07-07 20:31 ` Vegard Nossum
2008-07-07 20:39 ` Mattias Nissler
2008-07-07 21:08 ` [PATCH v2] " Mattias Nissler
2008-07-10 9:58 ` Vegard Nossum
2008-07-10 10:40 ` Ingo Molnar
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=19f34abd0807070427w5398c617uae0a4e8e40fd8f0e@mail.gmail.com \
--to=vegard.nossum@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mattias.nissler@gmx.de \
--cc=mingo@elte.hu \
--cc=netdev@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
--cc=stefano.brivio@polimi.it \
/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
all inboxes | Powered by JetHome®