diff options
| author | Fan Wu <fanwu01@zju.edu.cn> | 2026-08-12 06:17:14 +0000 |
|---|---|---|
| committer | Stefan Schmidt <stefan@datenfreihafen.org> | 2026-09-02 09:20:31 +0200 |
| commit | ff5891b266a7fc6a062710836be84f1cc19338b5 (patch) | |
| tree | 8b61cc60bec4b1126c027a5f552ee939ba4a4e3d /include/linux/errseq.h | |
| parent | 9012da455ab9a05d8205b90d0ad7c8b526f89062 (diff) | |
ieee802154: cc2520: fix FIFOP work use-after-free
The FIFOP interrupt handler queues cc2520_fifop_irqwork. On removal,
cc2520_remove() only flushes the work. The devm-managed FIFOP IRQ
remains active until after ->remove() returns and can queue the work
again after that flush, allowing it to run after the private data is
released.
Disable the work with disable_work_sync() instead of flushing it, so
the handler can no longer queue it once removal begins. Destroy the
buffer mutex last, since the worker and the stop callback invoked
through ieee802154_unregister_hw() both take it.
Found by an in-house static analysis tool.
Fixes: 0da6bc8cc341 ("ieee802154: cc2520: adds driver for TI CC2520 radio")
Cc: stable@vger.kernel.org # v6.10+
Suggested-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Assisted-by: Codex:gpt-5.6
Signed-off-by: Fan Wu <fanwu01@zju.edu.cn>
Link: https://lore.kernel.org/20260812061714.175966-1-fanwu01@zju.edu.cn
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Diffstat (limited to 'include/linux/errseq.h')
0 files changed, 0 insertions, 0 deletions
