From: Dan Carpenter <dan.carpenter@oracle.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: qca_vkondrat@qca.qualcomm.com, linux-wireless@vger.kernel.org
Subject: Re: cfg80211: add 802.11ad (60gHz band) support
Date: Tue, 3 Jul 2012 14:32:23 +0300 [thread overview]
Message-ID: <20120703113223.GE4519@mwanda> (raw)
In-Reply-To: <1341313457.5131.3.camel@jlt3.sipsolutions.net>
On Tue, Jul 03, 2012 at 01:04:17PM +0200, Johannes Berg wrote:
> 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.
It should be on by default in the latest code. :)
regards,
dan carpenter
next prev parent reply other threads:[~2012-07-03 11:32 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
2012-07-03 11:13 ` Vladimir Kondratiev
2012-07-03 11:34 ` Dan Carpenter
2012-07-03 11:32 ` Dan Carpenter [this message]
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=20120703113223.GE4519@mwanda \
--to=dan.carpenter@oracle.com \
--cc=johannes@sipsolutions.net \
--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 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).