netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Use of uninitialized memory in rate_control_pid_alloc()
@ 2008-07-07 11:27 Vegard Nossum
  2008-07-07 20:23 ` [PATCH] rc80211_pid: Fix fast_start parameter handling Mattias Nissler
  2008-07-07 21:08 ` [PATCH v2] " Mattias Nissler
  0 siblings, 2 replies; 7+ messages in thread
From: Vegard Nossum @ 2008-07-07 11:27 UTC (permalink / raw)
  To: Mattias Nissler, Stefano Brivio, John W. Linville,
	David S. Miller
  Cc: Ingo Molnar, Pekka Enberg, netdev, linux-kernel

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

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

end of thread, other threads:[~2008-07-10 10:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-07 11:27 Use of uninitialized memory in rate_control_pid_alloc() Vegard Nossum
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

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).