提交 47e4df94 编写于 作者: M Michal Kazior 提交者: Linus Torvalds

mac80211: fix channel switch for chanctx-based drivers

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: NLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 433ab34d
...@@ -1444,7 +1444,7 @@ ieee80211_vif_use_reserved_switch(struct ieee80211_local *local) ...@@ -1444,7 +1444,7 @@ ieee80211_vif_use_reserved_switch(struct ieee80211_local *local)
list_del(&sdata->reserved_chanctx_list); list_del(&sdata->reserved_chanctx_list);
list_move(&sdata->assigned_chanctx_list, list_move(&sdata->assigned_chanctx_list,
&new_ctx->assigned_vifs); &ctx->assigned_vifs);
sdata->reserved_chanctx = NULL; sdata->reserved_chanctx = NULL;
ieee80211_vif_chanctx_reservation_complete(sdata); ieee80211_vif_chanctx_reservation_complete(sdata);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册