diff options
author | Michal Kazior <michal.kazior@tieto.com> | 2014-08-18 07:19:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-22 17:45:49 -0400 |
commit | 47e4df94d129cbca84de252ff63c4ded08a513e7 (patch) | |
tree | fbbdae22f891b0e9eb5fd26abe0890ca2762bd89 /net | |
parent | 433ab34d26e29d0f036c3f514a09ae96f973d8c5 (diff) |
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 <torvalds@linux-foundation.org>
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/chan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c index 6d537f03c0ba..0375009ddc0d 100644 --- a/net/mac80211/chan.c +++ b/net/mac80211/chan.c | |||
@@ -1444,7 +1444,7 @@ ieee80211_vif_use_reserved_switch(struct ieee80211_local *local) | |||
1444 | 1444 | ||
1445 | list_del(&sdata->reserved_chanctx_list); | 1445 | list_del(&sdata->reserved_chanctx_list); |
1446 | list_move(&sdata->assigned_chanctx_list, | 1446 | list_move(&sdata->assigned_chanctx_list, |
1447 | &new_ctx->assigned_vifs); | 1447 | &ctx->assigned_vifs); |
1448 | sdata->reserved_chanctx = NULL; | 1448 | sdata->reserved_chanctx = NULL; |
1449 | 1449 | ||
1450 | ieee80211_vif_chanctx_reservation_complete(sdata); | 1450 | ieee80211_vif_chanctx_reservation_complete(sdata); |