From: Arend van Spriel <arend@broadcom.com>
To: Emil Goode <emilgoode@gmail.com>
Cc: Brett Rudley <brudley@broadcom.com>,
"Franky (Zhenhui) Lin" <frankyl@broadcom.com>,
Hante Meuleman <meuleman@broadcom.com>,
"John W. Linville" <linville@tuxdriver.com>,
Pieter-Paul Giesberts <pieterpg@broadcom.com>,
Daniel Kim <dekim@broadcom.com>, <linux-wireless@vger.kernel.org>,
<brcm80211-dev-list@broadcom.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH v2] brcmfmac: Fix off by one bug in brcmf_count_20mhz_channels()
Date: Tue, 23 Sep 2014 11:10:03 +0200 [thread overview]
Message-ID: <542138EB.40708@broadcom.com> (raw)
In-Reply-To: <1411426195-13467-1-git-send-email-emilgoode@gmail.com>
On 09/23/14 00:49, Emil Goode wrote:
> In the brcmf_count_20mhz_channels function we are looping through a list
> of channels received from firmware. Since the index of the first channel
> is 0 the condition leads to an off by one bug. This is causing us to hit
> the WARN_ON_ONCE(1) calls in the brcmu_d11n_decchspec function, which is
> how I discovered the bug.
>
> Introduced by:
> commit b48d891676f756d48b4d0ee131e4a7a5d43ca417
> ("brcmfmac: rework wiphy structure setup")
>
Hi John,
This bug was introduced in 3.17 so can it still go in the wireless tree?
I verified it applies to wireless/master branch.
Regards,
Arend
> Acked-by: Arend van Spriel<arend@broadcom.com>
> Signed-off-by: Emil Goode<emilgoode@gmail.com>
> ---
> v2: Added Arends "Acked-by" tag.
>
> drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
> index 12a60ca..0517687 100644
> --- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
> +++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
> @@ -4924,7 +4924,7 @@ static void brcmf_count_20mhz_channels(struct brcmf_cfg80211_info *cfg,
> struct brcmu_chan ch;
> int i;
>
> - for (i = 0; i<= total; i++) {
> + for (i = 0; i< total; i++) {
> ch.chspec = (u16)le32_to_cpu(chlist->element[i]);
> cfg->d11inf.decchspec(&ch);
>
prev parent reply other threads:[~2014-09-23 9:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-22 22:49 [PATCH v2] brcmfmac: Fix off by one bug in brcmf_count_20mhz_channels() Emil Goode
2014-09-23 9:10 ` Arend van Spriel [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=542138EB.40708@broadcom.com \
--to=arend@broadcom.com \
--cc=brcm80211-dev-list@broadcom.com \
--cc=brudley@broadcom.com \
--cc=dekim@broadcom.com \
--cc=emilgoode@gmail.com \
--cc=frankyl@broadcom.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=meuleman@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pieterpg@broadcom.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).