Re: [PATCH 2/2] wifi: mac80211_hwsim: serialize radio removal with frame commands

From: Johannes Berg

Date: Tue Nov 10 2026 - 05:59:21 EST


On Wed, 2026-10-28 at 22:17 +0800, Zhao Li wrote:
> Destroying a radio while a frame, TX status, or PMSR command is in
> progress can make the command access the radio after it has been freed.
>
> DEFINE_SPINLOCK(hwsim_radio_lock);
> +static DEFINE_MUTEX(hwsim_radio_mutex);

That, with significant work done under the mutex, seems like too big a
hammer, can't it really not be done in any other way?

johannes