LKML Archive on
help / color / mirror / Atom feed
From: Jesper Juhl <>
	"John W. Linville" <>,
	Kalle Valo <>
Subject: [PATCH] wireless, wl1251: Fix potential NULL pointer dereference in wl1251_op_bss_info_changed()
Date: Thu, 3 Feb 2011 21:14:01 +0100 (CET)	[thread overview]
Message-ID: <> (raw)

In drivers/net/wireless/wl1251/main.c:wl1251_op_bss_info_changed() we make 
a call to ieee80211_beacon_get() which may return NULL, but we do not 
check the return value before dereferencing the pointer.

Signed-off-by: Jesper Juhl <>
 main.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/wireless/wl1251/main.c b/drivers/net/wireless/wl1251/main.c
index 012e1a4..40372ba 100644
--- a/drivers/net/wireless/wl1251/main.c
+++ b/drivers/net/wireless/wl1251/main.c
@@ -1039,6 +1039,9 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw,
 	if (changed & BSS_CHANGED_BEACON) {
 		beacon = ieee80211_beacon_get(hw, vif);
+		if (!beacon)
+			goto out_sleep;
 		ret = wl1251_cmd_template_set(wl, CMD_BEACON, beacon->data,

Jesper Juhl <>  
Don't top-post
Plain text mails only, please.

                 reply	other threads:[~2011-02-03 20:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \
    --subject='Re: [PATCH] wireless, wl1251: Fix potential NULL pointer dereference in wl1251_op_bss_info_changed()' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).