lkml.org 
[lkml]   [2009]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] mac80211: pid, fix memory corruption
From
Date
On Mon, 2009-05-04 at 18:04 +0200, Jiri Slaby wrote:

> + for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
> + sband = hw->wiphy->bands[i];
> + if (sband->n_bitrates > max_rates)
> + max_rates = sband->n_bitrates;
> + }
> +
> /* We can safely assume that sband won't change unless we get
> * reinitialized. */
> - rinfo = kmalloc(sizeof(*rinfo) * sband->n_bitrates, GFP_ATOMIC);
> + rinfo = kmalloc(sizeof(*rinfo) * max_rates, GFP_ATOMIC);

I suppose you should remove the comment...

johannes
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2009-05-04 18:11    [W:0.631 / U:1.168 seconds]
©2003-2014 Jasper Spaans. Advertise on this site