From: Joe Perches <joe@perches.com>
To: Arend van Spriel <arend.vanspriel@broadcom.com>
Cc: Kalle Valo <kvalo@kernel.org>,
linux-wireless@vger.kernel.org, brcm80211@lists.linux.dev,
brcm80211-dev-list.pdl@broadcom.com,
LKML <linux-kernel@vger.kernel.org>
Subject: broadcom: brcmfmac, alloc without null test
Date: Sat, 17 Feb 2024 11:40:06 -0800 [thread overview]
Message-ID: <7658242ceef838cc553cb3bbb63ede20d1bf9cb5.camel@perches.com> (raw)
There's a missing NULL alloc test here:
It doesn't appear obvious what a proper fix is.
diff -u -p ./drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c /tmp/nothing/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
--- ./drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ /tmp/nothing/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -4308,7 +4308,6 @@ brcmf_pmksa_v3_op(struct brcmf_if *ifp,
int ret;
pmk_op = kzalloc(sizeof(*pmk_op), GFP_KERNEL);
- pmk_op->version = cpu_to_le16(BRCMF_PMKSA_VER_3);
if (!pmksa) {
/* Flush operation, operate on entire list */
next reply other threads:[~2024-02-17 19:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-17 19:40 Joe Perches [this message]
2024-02-18 8:26 ` broadcom: brcmfmac, alloc without null test 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=7658242ceef838cc553cb3bbb63ede20d1bf9cb5.camel@perches.com \
--to=joe@perches.com \
--cc=arend.vanspriel@broadcom.com \
--cc=brcm80211-dev-list.pdl@broadcom.com \
--cc=brcm80211@lists.linux.dev \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@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 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.