linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wifi: ath9k: Don't mark channelmap stack variable read-only in ath9k_mci_update_wlan_channels()
@ 2023-04-13 21:41 Toke Høiland-Jørgensen
  2023-04-14 10:00 ` Kalle Valo
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Toke Høiland-Jørgensen @ 2023-04-13 21:41 UTC (permalink / raw)
  To: Toke Høiland-Jørgensen, Kalle Valo, Colin Ian King
  Cc: linux-wireless, stable

This partially reverts commit e161d4b60ae3a5356e07202e0bfedb5fad82c6aa.

Turns out the channelmap variable is not actually read-only, it's modified
through the MCI_GPM_CLR_CHANNEL_BIT() macro further down in the function,
so making it read-only causes page faults when that code is hit.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=217183
Fixes: e161d4b60ae3 ("wifi: ath9k: Make arrays prof_prio and channelmap static const")
Cc: stable@vger.kernel.org
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
---
 drivers/net/wireless/ath/ath9k/mci.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/mci.c b/drivers/net/wireless/ath/ath9k/mci.c
index 3363fc4e8966..a0845002d6fe 100644
--- a/drivers/net/wireless/ath/ath9k/mci.c
+++ b/drivers/net/wireless/ath/ath9k/mci.c
@@ -646,9 +646,7 @@ void ath9k_mci_update_wlan_channels(struct ath_softc *sc, bool allow_all)
 	struct ath_hw *ah = sc->sc_ah;
 	struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci;
 	struct ath9k_channel *chan = ah->curchan;
-	static const u32 channelmap[] = {
-		0x00000000, 0xffff0000, 0xffffffff, 0x7fffffff
-	};
+	u32 channelmap[] = {0x00000000, 0xffff0000, 0xffffffff, 0x7fffffff};
 	int i;
 	s16 chan_start, chan_end;
 	u16 wlan_chan;
-- 
2.40.0


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2023-04-20 22:38 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-13 21:41 [PATCH] wifi: ath9k: Don't mark channelmap stack variable read-only in ath9k_mci_update_wlan_channels() Toke Høiland-Jørgensen
2023-04-14 10:00 ` Kalle Valo
2023-04-14 10:32   ` Toke Høiland-Jørgensen
2023-04-14 12:38     ` Kalle Valo
2023-04-18 10:14       ` Toke Høiland-Jørgensen
2023-04-19  4:54         ` Kalle Valo
2023-04-20 13:50           ` Thorsten Leemhuis
2023-04-20 14:24             ` Toke Høiland-Jørgensen
2023-04-20 14:50               ` Jakub Kicinski
2023-04-20 15:56                 ` Toke Høiland-Jørgensen
2023-04-20 16:39                   ` Jakub Kicinski
2023-04-20 15:59                 ` Thorsten Leemhuis
2023-04-20 16:55                   ` Jakub Kicinski
2023-04-20 18:27                     ` Linux regression tracking (Thorsten Leemhuis)
2023-04-19 14:24 ` Kalle Valo
2023-04-19 15:18   ` Colin King (gmail)
2023-04-20 21:09 ` One-off regression fix for 6.3 [was: Re: [PATCH] wifi: ath9k: Don't mark channelmap stack variable read-only in ath9k_mci_update_wlan_channels()] Toke Høiland-Jørgensen
2023-04-20 22:27   ` Linus Torvalds
2023-04-20 22:38     ` Toke Høiland-Jørgensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).