linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: ivan.kuten@promwad.com
Cc: linux-wireless@vger.kernel.org,
	Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com>
Subject: Re: [PATCH] wireless: Compare ethernet addresses by unaligned safe way
Date: Mon, 29 Jun 2009 10:23:28 +0200	[thread overview]
Message-ID: <1246263808.5947.4.camel@johannes.local> (raw)
In-Reply-To: <4A475F82.9040007@promwad.com>

[-- Attachment #1: Type: text/plain, Size: 1013 bytes --]

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 #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

      parent reply	other threads:[~2009-06-29  8:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-16 10:54 [PATCH] wireless: Compare ethernet addresses by unaligned safe way Yauhen Kharuzhy
2009-06-16 11:14 ` Johannes Berg
2009-06-28 12:18   ` Ivan Kuten
2009-06-29  7:58     ` Johannes Berg
2009-07-23 17:56       ` Ivan Kuten
2009-07-23 17:59         ` Johannes Berg
2009-08-07 15:34           ` John W. Linville
2009-06-29  8:23     ` Johannes Berg [this message]

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=1246263808.5947.4.camel@johannes.local \
    --to=johannes@sipsolutions.net \
    --cc=ivan.kuten@promwad.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=yauhen.kharuzhy@promwad.com \
    /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;
as well as URLs for NNTP newsgroup(s).