* [PATCH mac80211-next] brcm80211: fix null pointer access
@ 2013-06-19 11:35 Antonio Quartulli
2013-06-19 19:27 ` John W. Linville
0 siblings, 1 reply; 3+ messages in thread
From: Antonio Quartulli @ 2013-06-19 11:35 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Antonio Quartulli
From: Antonio Quartulli <antonio@open-mesh.com>
Do not unconditionally access the chan variable in
brcmf_cfg80211_mgmt_tx() as it may be NULL.
Use freq instead.
Introduced by c2ff8cad64233b539c71a27e2a6e324001143ef0
("brcm80211: make mgmt_tx in brcmfmac accept a NULL channel")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
---
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index 8bd256b..d316d62 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@ -3985,8 +3985,7 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
le16_to_cpu(action_frame->len));
brcmf_dbg(TRACE, "Action frame, cookie=%lld, len=%d, freq=%d\n",
- *cookie, le16_to_cpu(action_frame->len),
- chan->center_freq);
+ *cookie, le16_to_cpu(action_frame->len), freq);
ack = brcmf_p2p_send_action_frame(cfg, cfg_to_ndev(cfg),
af_params);
--
1.8.1.5
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH mac80211-next] brcm80211: fix null pointer access
2013-06-19 11:35 [PATCH mac80211-next] brcm80211: fix null pointer access Antonio Quartulli
@ 2013-06-19 19:27 ` John W. Linville
2013-06-19 19:48 ` Antonio Quartulli
0 siblings, 1 reply; 3+ messages in thread
From: John W. Linville @ 2013-06-19 19:27 UTC (permalink / raw)
To: Antonio Quartulli; +Cc: Johannes Berg, linux-wireless, Antonio Quartulli
FWIW, driver fixes like this come to me rather than Johannes...
On Wed, Jun 19, 2013 at 01:35:31PM +0200, Antonio Quartulli wrote:
> From: Antonio Quartulli <antonio@open-mesh.com>
>
> Do not unconditionally access the chan variable in
> brcmf_cfg80211_mgmt_tx() as it may be NULL.
> Use freq instead.
>
> Introduced by c2ff8cad64233b539c71a27e2a6e324001143ef0
> ("brcm80211: make mgmt_tx in brcmfmac accept a NULL channel")
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
> ---
> drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
> index 8bd256b..d316d62 100644
> --- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
> +++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
> @@ -3985,8 +3985,7 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
> le16_to_cpu(action_frame->len));
>
> brcmf_dbg(TRACE, "Action frame, cookie=%lld, len=%d, freq=%d\n",
> - *cookie, le16_to_cpu(action_frame->len),
> - chan->center_freq);
> + *cookie, le16_to_cpu(action_frame->len), freq);
>
> ack = brcmf_p2p_send_action_frame(cfg, cfg_to_ndev(cfg),
> af_params);
> --
> 1.8.1.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH mac80211-next] brcm80211: fix null pointer access
2013-06-19 19:27 ` John W. Linville
@ 2013-06-19 19:48 ` Antonio Quartulli
0 siblings, 0 replies; 3+ messages in thread
From: Antonio Quartulli @ 2013-06-19 19:48 UTC (permalink / raw)
To: John W. Linville
Cc: Antonio Quartulli, Johannes Berg, linux-wireless@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 415 bytes --]
Hi John,
On Wed, Jun 19, 2013 at 12:27:14PM -0700, John W. Linville wrote:
> FWIW, driver fixes like this come to me rather than Johannes...
>
I sent this to Johannes because this is fixing a patch I sent a couple of days
ago, and therefore I did not know if this patch was already in your tree or not.
Cheers,
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-06-19 19:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-19 11:35 [PATCH mac80211-next] brcm80211: fix null pointer access Antonio Quartulli
2013-06-19 19:27 ` John W. Linville
2013-06-19 19:48 ` Antonio Quartulli
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.