From: per.forlin@gmail.com
To: linux-wireless@vger.kernel.org
Cc: arend@broadcom.com, brudley@broadcom.com,
Per Forlin <per.forlin@gmail.com>
Subject: [PATCH] brcmf: Fix null pointer exception in bcdc_hdrpull
Date: Sun, 17 Apr 2016 15:25:03 +0200 [thread overview]
Message-ID: <1460899503-5245-1-git-send-email-per.forlin@gmail.com> (raw)
From: Per Forlin <per.forlin@gmail.com>
In fwsignal.c: brcmf_fws_commit_skb()
...
if (rc < 0) {
entry->transit_count--;
if (entry->suppressed)
entry->suppr_transit_count--;
(void)brcmf_proto_hdrpull(fws->drvr, false, skb, NULL);
^^^^^^^
goto rollback;
}
...
The call to hdrpull will trigger a null pointer exception
unless a null check is made in the method implementation.
Signed-off-by: Per Forlin <per.forlin@gmail.com>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c
index 6af658e..81727da2 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c
@@ -321,7 +321,8 @@ brcmf_proto_bcdc_hdrpull(struct brcmf_pub *drvr, bool do_fws,
if (pktbuf->len == 0)
return -ENODATA;
- *ifp = tmp_if;
+ if (ifp != NULL)
+ *ifp = tmp_if;
return 0;
}
--
2.1.4
next reply other threads:[~2016-04-17 13:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-17 13:25 per.forlin [this message]
2016-04-26 9:19 ` brcmf: Fix null pointer exception in bcdc_hdrpull Kalle Valo
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=1460899503-5245-1-git-send-email-per.forlin@gmail.com \
--to=per.forlin@gmail.com \
--cc=arend@broadcom.com \
--cc=brudley@broadcom.com \
--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 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).