mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
sched: Be more strict about p->is_blocked
Upon entry to try_to_block_task(), p->is_blocked should be false. After all, the prior wakeup would have made it so per ttwu_do_wakeup(). Ensure this is the case, rather than clearing it in the path that doesn't set it. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: John Stultz <jstultz@google.com> Link: https://patch.msgid.link/20260526113322.364017314%40infradead.org
This commit is contained in:
parent
abc40cca0e
commit
708024b575
|
|
@ -6676,8 +6676,9 @@ static bool try_to_block_task(struct rq *rq, struct task_struct *p,
|
|||
{
|
||||
unsigned long task_state = *task_state_p;
|
||||
|
||||
WARN_ON_ONCE(p->is_blocked);
|
||||
|
||||
if (signal_pending_state(task_state, p)) {
|
||||
p->is_blocked = 0;
|
||||
WRITE_ONCE(p->__state, TASK_RUNNING);
|
||||
*task_state_p = TASK_RUNNING;
|
||||
clear_task_blocked_on(p, NULL);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user