[PATCH 4/4] wifi: mt76: connac: synchronize token_count access in mt76_connac_skip_fw_pmctrl

Felix Fietkau nbd at nbd.name
Mon Sep 8 22:05:33 PDT 2025


On 05.09.25 04:14, Mingyen Hsieh (謝明諺) wrote:
> I haven't seen a real race so far, but during my observation, I noticed
> that some functions using token_count are protected by a lock. That's
> why i added the protection in this patch. These are just my thoughts,
> and maybe i might have missed something-perhaps the protection isn't
> needed here.

In that case, I don't think that this patch adds any extra race 
protection. Other places that take dev->token_lock typically either 
write a token related variable or interact with the idr as well and need 
locking because of that.

Thanks,

- Felix



More information about the Linux-mediatek mailing list