From: Johannes Berg <johannes@sipsolutions.net>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: qca_vkondrat@qca.qualcomm.com, linux-wireless@vger.kernel.org
Subject: Re: cfg80211: add 802.11ad (60gHz band) support
Date: Tue, 03 Jul 2012 13:04:17 +0200 [thread overview]
Message-ID: <1341313457.5131.3.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <20120703105342.GA29879@elgon.mountain> (sfid-20120703_125355_865535_D89FFB14)
On Tue, 2012-07-03 at 13:53 +0300, Dan Carpenter wrote:
> Hello Vladimir Kondratiev,
>
> The patch 3a0c52a6d82c: "cfg80211: add 802.11ad (60gHz band) support"
> from Jul 2, 2012, leads to the following warning:
> drivers/net/wireless/mac80211_hwsim.c:1841 init_mac80211_hwsim()
> warn: buffer overflow 'data->bands' 2 <= 2
>
> drivers/net/wireless/mac80211_hwsim.c
> 1839
> 1840 for (band = IEEE80211_BAND_2GHZ; band < IEEE80211_NUM_BANDS; band++) {
> ^^^^^^^^^^^^^^^^^^^
> We raised IEEE80211_NUM_BANDS to 3.
>
> 1841 struct ieee80211_supported_band *sband = &data->bands[band];
> ^^^^^^^^^^^
> This only has 2 elements still.
>
> 1842 switch (band) {
> 1843 case IEEE80211_BAND_2GHZ:
>
> It causes a bogus dereference later.
Thanks Dan!
Is this one of your non-default tests? I think I ran smatch on this, but
it might be old. Anyway, I'll commit this fix:
http://p.sipsolutions.net/a1c40eea7e33541b.txt
johannes
next prev parent reply other threads:[~2012-07-03 11:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-03 10:53 cfg80211: add 802.11ad (60gHz band) support Dan Carpenter
2012-07-03 11:04 ` Johannes Berg [this message]
2012-07-03 11:13 ` Vladimir Kondratiev
2012-07-03 11:34 ` Dan Carpenter
2012-07-03 11:32 ` Dan Carpenter
2012-07-03 11:42 ` Johannes Berg
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=1341313457.5131.3.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=dan.carpenter@oracle.com \
--cc=linux-wireless@vger.kernel.org \
--cc=qca_vkondrat@qca.qualcomm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.