projects/linux·commit 47e4df94

mac80211: fix channel switch for chanctx-based drivers

47e4df94 · Michal Kazior <[email protected]> · 2014-08-18 13:19:09 +02:00

The new_ctx pointer is set only for non-chanctx drivers.  This yielded a
crash for chanctx-based drivers during channel switch finalization:

  BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
  IP: ieee80211_vif_use_reserved_switch+0x71c/0xb00 [mac80211]

Use an adequate chanctx pointer to fix this.

Reported-by: Linus Torvalds <[email protected]>
Signed-off-by: Michal Kazior <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
47e4df94d129cbca84de252ff63c4ded08a513e7
Parents
433ab34d

Changes

1 files changed · +1 −1

FileStatusAddDelContent
net/mac80211/chan.cmodified+1−1View file

net/mac80211/chan.c

View file
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c
index 6d537f0..0375009 100644
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
@@ -1444,7 +1444,7 @@ ieee80211_vif_use_reserved_switch(struct ieee80211_local *local)
list_del(&sdata->reserved_chanctx_list);
list_move(&sdata->assigned_chanctx_list,
- &new_ctx->assigned_vifs);
+ &ctx->assigned_vifs);
sdata->reserved_chanctx = NULL;
ieee80211_vif_chanctx_reservation_complete(sdata);