Re: [PATCH] wifi: iwlegacy: serialize watchdog updates with device teardown

From: Johannes Berg

Date: Mon Oct 05 2026 - 09:26:27 EST


On Sun, 2026-10-04 at 19:45 +0800, Runyu Xiao wrote:
> The writable wd_timeout debugfs file changes il->cfg->wd_timeout, but the
> iwl3945 configuration is shared and const. The handler also rearms the
> watchdog without taking il->mutex. The down paths hold this mutex, delete
> the timer, and then free the TX queues, so an unlocked debugfs write can
> rearm the timer after deletion. The callback can then access the queues
> after they have been freed.
>
> Store wd_timeout in per-device state. Serialize the debugfs update with
> the down paths and only arm the watchdog while TX queues exist. Use
> READ_ONCE() and WRITE_ONCE() for accesses that do not hold il->mutex.
>

That's a stupid commit log, I can see what you changed.

johannes