Search Linux Wireless

Re: [PATCH 2/2] mac80211: pid, fix memory corruption

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux