Thread (6 messages) read the whole thread 6 messages, 4 authors, 19d ago

Re: [PATCH] wifi: brcmfmac: drain bus_reset work on device removal

From: Arend van Spriel <arend.vanspriel@broadcom.com>
Date: 2026-07-12 21:57:27
Also in: linux-wireless, lkml, stable

On Thu,  9 Jul 2026 10:16:35 +0000, Fan Wu wrote:
brcmf_fw_crashed() and the debugfs "reset" entry both schedule
drvr->bus_reset, whose callback recovers drvr through container_of()
and dereferences it.
[...]

The patch does not apply cleanly on wl-next/main -- a rebase is needed.

I looked more carefully at the cancel_work_sync-under-lock concern that was
raised in the thread. brcmf_core_bus_reset() never acquires bus_reset_lock,
so there is no deadlock. If the work has already started when
brcmf_bus_cancel_reset_work() is called, cancel_work_sync() waits for it to
finish; by then the reset op (brcmf_pcie_reset) has completed its own
teardown and reinitialized the device, so the subsequent remove teardown acts
on a clean device. The design is correct as submitted; only the rebase is
needed.

Regards,
Arend
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help