diff mbox

[00/16] wl1251 patches from linux-n900 tree

Message ID 201311252054.41177@pali (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Pali Rohár Nov. 25, 2013, 7:54 p.m. UTC
On Friday 08 November 2013 15:20:07 Felipe Contreras wrote:
> On Sat, Oct 26, 2013 at 3:33 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
> > Hello, I'm sending wl1251 patches from linux-n900 tree [1]
> > for comments. More patches come from David's monitor &
> > packet injection work. Patches are tested with 3.12 rc5
> > kernel on Nokia N900.
> > 
> > [1] - https://gitorious.org/linux-n900/linux-n900
> 
> How did you test these patches? I get a panic loop immediately
> after I bring the interface loop in monitor mode (v3.12).

Hi!

now I can reproduce this crash with 3.12-rc5 kernel. Problem
looks like irrelevant to this patch series and is present in 3.12
kernel. There is possible NULL pointer dereference.

With this patch I'm not able to reproduce this bug:
diff mbox

Patch

diff --git a/drivers/net/wireless/ti/wl1251/event.c b/drivers/net/wireless/ti/wl1251/event.c
index 192cebd..db01053 100644
--- a/drivers/net/wireless/ti/wl1251/event.c
+++ b/drivers/net/wireless/ti/wl1251/event.c
@@ -124,7 +124,7 @@  static int wl1251_event_process(struct wl1251 *wl, struct event_mailbox *mbox)
 			return ret;
 	}
 
-	if (vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID) {
+	if (wl->vif && vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID) {
 		wl1251_debug(DEBUG_EVENT, "SYNCHRONIZATION_TIMEOUT_EVENT");
 
 		/* indicate to the stack, that beacons have been lost */