Search Linux Wireless

Re: [PATCH] wireless: Compare ethernet addresses by unaligned safe way

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

 



On Sun, 2009-06-28 at 15:18 +0300, Ivan Kuten wrote:
> Hello,
> 
> In net/wireless/scan.c : cfg80211_wext_siwscan there seems also unaligned allocations
> for creq->ssids and creq->channels. Should it be something like that?
> 
> Modified: trunk/uClinux-dist-2008R1-RC8/compat-wireless-2009-06-11/net/wireless/scan.c
> ==============================================================================
> --- trunk/uClinux-dist-2008R1-RC8/compat-wireless-2009-06-11/net/wireless/scan.c (original)
> +++ trunk/uClinux-dist-2008R1-RC8/compat-wireless-2009-06-11/net/wireless/scan.c Fri Jun 26 14:00:52 2009
> @@ -619,7 +619,7 @@
>  		if (wiphy->bands[band])
>  			n_channels += wiphy->bands[band]->n_channels;
> 
> -	creq = kzalloc(sizeof(*creq) + sizeof(struct cfg80211_ssid) +
> +	creq = kzalloc(roundup(sizeof(*creq), 4) + roundup(sizeof(struct cfg80211_ssid), 4) +
>  		       n_channels * sizeof(void *),
>  		       GFP_ATOMIC);

Also, that should be sizeof(void *) instead of "4".

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