From: Su Hui <suhui@nfschina.com>
To: arend.vanspriel@broadcom.com, kvalo@kernel.org
Cc: Su Hui <suhui@nfschina.com>,
quic_jjohnson@quicinc.com, u.kleine-koenig@pengutronix.de,
stanley.hsu@cypress.com, linux-wireless@vger.kernel.org,
brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH wireless 2/9] wifi: brcmfmac: avoid garbage value of 'status' in brcmf_c_download_blob()
Date: Tue, 2 Jul 2024 20:24:45 +0800 [thread overview]
Message-ID: <20240702122450.2213833-3-suhui@nfschina.com> (raw)
In-Reply-To: <20240702122450.2213833-1-suhui@nfschina.com>
brcmf_fil_iovar_int_get() reads the value of 'status' and passes it
to brcmf_fil_iovar_data_get(). The garbage value of 'status' will
finally be copied to 'ifp->drvr->proto_buf'. Initialize 'status' to
avoid garbage value.
Fixes: fdd0bd88ceae ("brcmfmac: add CLM download support")
Signed-off-by: Su Hui <suhui@nfschina.com>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
index b24faae35873..03277131ef2b 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
@@ -127,7 +127,7 @@ static int brcmf_c_download_blob(struct brcmf_if *ifp,
u32 datalen;
u32 cumulative_len;
u16 dl_flag = DL_BEGIN;
- u32 status;
+ u32 status = 0;
s32 err;
brcmf_dbg(TRACE, "Enter\n");
--
2.30.2
next prev parent reply other threads:[~2024-07-02 12:25 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-02 12:24 [PATCH wireless 0/9] wifi: cfg80211: avoid some garbage values Su Hui
2024-07-02 12:24 ` [PATCH wireless 1/9] wifi: cfg80211: avoid garbage value of 'io_type' in brcmf_cfg80211_attach() Su Hui
2024-07-02 13:57 ` Dan Carpenter
2024-07-02 15:07 ` Arend Van Spriel
2024-07-02 15:29 ` Kalle Valo
2024-07-02 15:37 ` Dan Carpenter
2024-07-02 16:26 ` Arend Van Spriel
2024-07-02 16:37 ` Dan Carpenter
2024-07-02 15:39 ` Arend Van Spriel
2024-07-03 1:41 ` Su Hui
2024-07-03 4:42 ` Arend Van Spriel
2024-07-03 7:38 ` Su Hui
2024-07-03 13:23 ` Dan Carpenter
2024-07-02 12:24 ` Su Hui [this message]
2024-07-02 12:24 ` [PATCH wireless 3/9] wifi: cfg80211: avoid garbage value of 'noise' in brcmf_cfg80211_dump_survey() Su Hui
2024-07-02 12:24 ` [PATCH wireless 4/9] wifi: cfg80211: avoid garbage value of 'chanspec' in brcmf_cfg80211_get_channel() Su Hui
2024-07-02 12:24 ` [PATCH wireless 5/9] wifi: cfg80211: avoid garbage value of 'freq' in brcmf_cfg80211_mgmt_tx() Su Hui
2024-07-02 12:24 ` [PATCH wireless 6/9] wifi: cfg80211: avoid garbage value of 'wsec' in brcmf_cfg80211_reconfigure_wep() Su Hui
2024-07-02 12:24 ` [PATCH wireless 7/9] wifi: cfg80211: avoid garbage value of 'wsec' in brcmf_cfg80211_add_key() Su Hui
2024-07-02 12:24 ` [PATCH wireless 8/9] wifi: cfg80211: avoid garbage value of 'val' in brcmf_set_key_mgmt() Su Hui
2024-07-02 12:24 ` [PATCH wireless 9/9] wifi: cfg80211: avoid garbage value of 'wsec' in brcmf_cfg80211_{get,config_default}_key() Su Hui
2024-07-02 12:49 ` [PATCH wireless 0/9] wifi: cfg80211: avoid some garbage values Johannes Berg
2024-07-02 14:41 ` Arend Van Spriel
2024-07-02 14:02 ` Jonas Gorski
2024-07-02 15:01 ` Arend Van Spriel
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=20240702122450.2213833-3-suhui@nfschina.com \
--to=suhui@nfschina.com \
--cc=arend.vanspriel@broadcom.com \
--cc=brcm80211-dev-list.pdl@broadcom.com \
--cc=brcm80211@lists.linux.dev \
--cc=kernel-janitors@vger.kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_jjohnson@quicinc.com \
--cc=stanley.hsu@cypress.com \
--cc=u.kleine-koenig@pengutronix.de \
/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