From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: Kalle Valo <kvalo@kernel.org>
Cc: Colin Ian King <colin.i.king@gmail.com>, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] wifi: ath9k: Don't mark channelmap stack variable read-only in ath9k_mci_update_wlan_channels()
Date: Tue, 18 Apr 2023 12:14:48 +0200 [thread overview]
Message-ID: <877cu9wl7r.fsf@toke.dk> (raw)
In-Reply-To: <87edom7i6i.fsf@kernel.org>
Kalle Valo <kvalo@kernel.org> writes:
> (dropping stable from cc)
>
> Toke Høiland-Jørgensen <toke@toke.dk> writes:
>
>> Kalle Valo <kvalo@kernel.org> writes:
>>
>>> Toke Høiland-Jørgensen <toke@toke.dk> writes:
>>>
>>>> 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>
>>>
>>> I guess the casting in MCI_GPM_CLR_CHANNEL_BIT() hide this and made it
>>> impossible for the compiler to detect it? A perfect example why I hate
>>> casting :)
>>
>> Yup, exactly. I was also assuming the compiler would catch it, but yay, C! :/
>
> We have so many static checkers that I wonder if those would be able to
> catch these kind of buggy casts? We had a similar bug in rtw89 something
> like a year ago.
No idea. Would be nice, yeah... :)
>> Anyway, cf the bugzilla this was a pretty bad regression for 6.2, so
>> would be good to move this along reasonably quickly (although I guess we
>> just missed the -net PR for rc7)...
>
> I'm not planning to send anymore stuff to v6.3 so my plan is to take
> this to -next. The merge window is very close anyway so this shouldn't
> cause too much delay.
Hmm, okay, a bit unfortunate that we'll ship 6.3 with the same bug, but
if it goes in during the merge window, I guess we'll get the fix into
6.3.1 (or something close to that) via stable? I can live with that...
-Toke
next prev parent reply other threads:[~2023-04-18 10:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877cu9wl7r.fsf@toke.dk \
--to=toke@toke.dk \
--cc=colin.i.king@gmail.com \
--cc=kvalo@kernel.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).