Skip to content

brcmfmac: fix firmware crash due to mismatched completion handlers#7460

Merged
pelwell merged 1 commit into
raspberrypi:rpi-6.18.yfrom
bnicolae:rpi-6.18.y
Jun 29, 2026
Merged

brcmfmac: fix firmware crash due to mismatched completion handlers#7460
pelwell merged 1 commit into
raspberrypi:rpi-6.18.yfrom
bnicolae:rpi-6.18.y

Conversation

@bnicolae

@bnicolae bnicolae commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Without a valid cookie to distinguish pending concurrent completion events, mismatches occur under concurrency that crash the firmware. The cookie is used to populate mf_params->packet_id and is sent to firmware via vif->mgmt_tx_id. Later, completions are matched using if (packet_id != vif->mgmt_tx_id). This fix uses a monotonous atomic counter that guarantees unique ids.

Without a valid cookie to distinguish pending concurrent completion
events, mismatches occur under concurrency that crash the firmware.
This fix uses a monotonous atomic counter that guarantees unique ids.

Signed-off-by: Bogdan Nicolae <bogdan.nicolae@acm.org>
@pelwell

pelwell commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

I can see how that might make a difference, but also it doesn't look as if it could break anything.

@pelwell pelwell merged commit d3d330f into raspberrypi:rpi-6.18.y Jun 29, 2026
12 checks passed
@lategoodbye

Copy link
Copy Markdown
Contributor

@bnicolae Could you please send this patch upstream?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants