]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob
2d78762b8be290360e6672ae2b527541d76024f4
[thirdparty/kernel/stable-queue.git] /
1 From 0f2a4af27b649c13ba76431552fe49c60120d0f6 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= <toke@toke.dk>
3 Date: Thu, 13 Apr 2023 23:41:18 +0200
4 Subject: wifi: ath9k: Don't mark channelmap stack variable read-only in ath9k_mci_update_wlan_channels()
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 From: Toke Høiland-Jørgensen <toke@toke.dk>
10
11 commit 0f2a4af27b649c13ba76431552fe49c60120d0f6 upstream.
12
13 This partially reverts commit e161d4b60ae3a5356e07202e0bfedb5fad82c6aa.
14
15 Turns out the channelmap variable is not actually read-only, it's modified
16 through the MCI_GPM_CLR_CHANNEL_BIT() macro further down in the function,
17 so making it read-only causes page faults when that code is hit.
18
19 Link: https://bugzilla.kernel.org/show_bug.cgi?id=217183
20 Link: https://lore.kernel.org/r/20230413214118.153781-1-toke@toke.dk
21 Fixes: e161d4b60ae3 ("wifi: ath9k: Make arrays prof_prio and channelmap static const")
22 Cc: stable@vger.kernel.org
23 Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
24 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
25 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26 ---
27 drivers/net/wireless/ath/ath9k/mci.c | 4 +---
28 1 file changed, 1 insertion(+), 3 deletions(-)
29
30 diff --git a/drivers/net/wireless/ath/ath9k/mci.c b/drivers/net/wireless/ath/ath9k/mci.c
31 index 3363fc4e8966..a0845002d6fe 100644
32 --- a/drivers/net/wireless/ath/ath9k/mci.c
33 +++ b/drivers/net/wireless/ath/ath9k/mci.c
34 @@ -646,9 +646,7 @@ void ath9k_mci_update_wlan_channels(struct ath_softc *sc, bool allow_all)
35 struct ath_hw *ah = sc->sc_ah;
36 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci;
37 struct ath9k_channel *chan = ah->curchan;
38 - static const u32 channelmap[] = {
39 - 0x00000000, 0xffff0000, 0xffffffff, 0x7fffffff
40 - };
41 + u32 channelmap[] = {0x00000000, 0xffff0000, 0xffffffff, 0x7fffffff};
42 int i;
43 s16 chan_start, chan_end;
44 u16 wlan_chan;
45 --
46 2.40.0
47