Re: [PATCH] hrtimer.c : Remove redundant thread state settings

From: Thomas Gleixner
Date: Thu Jan 11 2024 - 11:44:29 EST


On Wed, Jan 10 2024 at 06:13, Lizhe wrote:
> After a thread is awakened, its state is already task_running

That's correct, but please look at hrtimer_wakeup() and the conditional
schedule() invocation in schedule_hrtimeout_range_clock(). You break the
guarantee that this function returns with task state == TASK_RUNNING.

Thanks,

tglx