On 10/24/23 01:28, Johannes Berg wrote:
On Mon, 2023-10-23 at 13:05 -0700, Ben Greear wrote:
On 10/23/23 11:17, Johannes Berg wrote:
On Mon, 2023-10-23 at 10:57 -0700, greearb@xxxxxxxxxxxxxxx wrote:
From: Ben Greear <greearb@xxxxxxxxxxxxxxx>
Protect from NULL ifmgd->assoc_data in ieee80211_mgd_deauth, crash
was seen here fairly often in a 32-station test case utilizing
mtk7922 and be200 radios. I'm not sure if radio types matters
though.
Signed-off-by: Ben Greear <greearb@xxxxxxxxxxxxxxx>
---
Patch is for wireless-next tree, bug was likely introduced in
this release since this crash was not seen in earlier 6.6-rc testing
nor in 6.5 or earlier.
There may be a better way to fix this...
I mean, you're not *actually* suggesting we merge this patch, right?
Right?!
No, but it is easier to explain backtraces when you can see the code that
generated it.
Sure, but why actually post it as a [PATCH] then rather than just part
of the bug report or something? :)
Anyway ...
The bug appears to have come in with this patch that I grabbed from linux-wireless
mailing list:
[greearb@ben-dt5 linux-6.6-wn.dev.y]$ git show 4600547c01ef7
commit 4600547c01ef728113253c6df9367eb4ed75193c
Author: Miri Korenblit <miriam.rachel.korenblit@xxxxxxxxx>
Date: Thu Sep 28 17:35:34 2023 +0300
wifi: mac80211: add link id to mgd_prepare_tx()
As we are moving to MLO and links terms, also the airtime protection
will be done for a link rather than for a vif. Thus, some
drivers will need to know for which link to protect airtime.
Add link id as a parameter to the mgd_prepare_tx() callback.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@xxxxxxxxx>
Signed-off-by: Gregory Greenman <gregory.greenman@xxxxxxxxx>
I see no response to it on linux-wireless mailing list. I applied the
series locally since it preceded other iwlwifi related patches that
I wanted to test.
I applied the same patch as commit
e76f3b4a73ea60ef098c5762b2aef4d11e094a04
Author: Miri Korenblit <miriam.rachel.korenblit@xxxxxxxxx>
Date: Thu Sep 28 17:35:34 2023 +0300
wifi: mac80211: add link id to mgd_prepare_tx()
from
https://lore.kernel.org/r/20230928172905.c7fc59a6780b.Ic88a5037d31e184a2dce0b031ece1a0a93a3a9da@changeid
It doesn't contain that bug, neither in my version nor in the list
version.
Maybe you had some conflicts due to other changes and resolved them
incorrectly by accident?
So proper fix (assuming Miri's patch is applied at all) is to just not
assign link-id in this specific case?
No, it should assign the link ID from the correct place, as Miri's patch
does :)
My hack/patch did have a typo in it on the second clause, and checked the
wrong thing being NULL. But, before I got the patch into my kernel, I managed
to hit NPE in both the clauses. Not immediately...but sometimes.
I noticed afterwards that mtk7922 has a regression where it will not assoc on
6e, and it was 6e test case that reliably triggered the bug, so I suspect
it is something about deauthing a sta that never managed to auth in the first
place.
I guess just keep it in mind if someone else reports the problem. I'll run locally
with an 'if null, skip assigning link-id' patch.
But there is also the case where a patch may be technically OK, and useful
to me, but it is not an API or feature that the driver/stack maintainer
cares about, so it is ignored.
Well, it does raise the question of whether we (or often really just
me?) should maintain something in upstream that's not generally useful,
or already solved in another way (like ethtool stuff).
I'm not going likely going anywhere. I have been maintaining my various patches
out-of-tree for a great many years, and that is even worse than maintaining them
in the tree. So whatever of my stuff makes it into the tree, if you ever find it
needs some work and I don't notice right away, dump it on me and I or someone else
at my company will work on it.
Thanks,
Ben
Yes, I tend to not want to commit to saying no and let stuff linger, and
that's really a bad pattern that I have.
Regarding my previous patch to fix a
crash,
If you mean this:
https://patchwork.kernel.org/project/linux-wireless/patch/20231021154827.1142734-1-greearb@xxxxxxxxxxxxxxx/
I'm not going to spend my time renaming
variables on the off chance that you'd like the patch vs just fixing the
specific broken code and moving on to other tasks.
I actually applied it. Someone else was replying there :)
Since you known your
own mind, you could rename variables in 2 minutes, post the patch, and
you'd be done.
Agree. I think I do that, but maybe not often enough.
johannes
--
Ben Greear <greearb@xxxxxxxxxxxxxxx>
Candela Technologies Inc http://www.candelatech.com