Netdev List
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Marcus Better <marcus@better.se>
Cc: netdev@vger.kernel.org, "John W. Linville" <linville@tuxdriver.com>
Subject: Re: [PATCH] nl80211: Allocate array of pointers for nla_parse
Date: Tue, 16 Jan 2007 10:42:18 +0000	[thread overview]
Message-ID: <1168944139.9175.3.camel@johannes.berg> (raw)
In-Reply-To: <200701161113.52523.marcus@better.se>

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

On Tue, 2007-01-16 at 11:13 +0100, Marcus Better wrote:
> The code allocates an array of struct nlattr, but it seems to me that it should allocate an array of pointers.
> 
> Signed-off-by: Marcus Better <marcus@better.se>

Yup.
Acked-by: Johannes Berg <johannes@sipsolutions.net>

> --- a/net/wireless/nl80211.c
> +++ b/net/wireless/nl80211.c
> @@ -843,7 +843,7 @@ static int nl80211_initiate_scan(struct sk_buff *skb, struct genl_info *info)
>  
>  		channels = kmalloc(count * sizeof(struct scan_channel),
>  				   GFP_KERNEL);
> -		tb = kmalloc((NL80211_ATTR_MAX+1) * sizeof(struct nlattr),
> +		tb = kmalloc((NL80211_ATTR_MAX+1) * sizeof(struct nlattr *),
>  			     GFP_KERNEL);
>  
>  		count = 0;

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

      reply	other threads:[~2007-01-16 10:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-16 10:13 [PATCH] nl80211: Allocate array of pointers for nla_parse Marcus Better
2007-01-16 10:42 ` 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=1168944139.9175.3.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=linville@tuxdriver.com \
    --cc=marcus@better.se \
    --cc=netdev@vger.kernel.org \
    /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