Skip to content

Commit 47e4df9

Browse files
Michal Kaziortorvalds
authored andcommitted
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: Linus Torvalds <[email protected]> Signed-off-by: Michal Kazior <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 433ab34 commit 47e4df9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/mac80211/chan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1444,7 +1444,7 @@ ieee80211_vif_use_reserved_switch(struct ieee80211_local *local)
14441444

14451445
list_del(&sdata->reserved_chanctx_list);
14461446
list_move(&sdata->assigned_chanctx_list,
1447-
&new_ctx->assigned_vifs);
1447+
&ctx->assigned_vifs);
14481448
sdata->reserved_chanctx = NULL;
14491449

14501450
ieee80211_vif_chanctx_reservation_complete(sdata);

0 commit comments

Comments
 (0)