On 04.09.25 05:06, Mingyen Hsieh wrote:
From: Ming Yen Hsieh <mingyen.hsieh@xxxxxxxxxxxx> Read dev->token_count under token_lock to prevent race conditions with concurrent token updates, ensuring accurate power management decisions. Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@xxxxxxxxxxxx>
I don't understand what kind of race you're trying to solve with this patch. Are you trying to fix entering powersave while a badly timed tx is started? Or are you trying to make it go to sleep more reliably during concurrent cleanup of pending tx? What context does this race against, and is taking the token lock really enough to fully close the race?
Thanks, - Felix