Re: [PATCH] sched: remove false-positive warning from wake_up_process()
From: Peter Zijlstra
Date: Thu Dec 03 2015 - 07:37:02 EST
On Mon, Nov 30, 2015 at 08:34:20PM -0500, Sasha Levin wrote:
> Futex can have a spurious wake up before we actually wake it up on our own,
> which will trigger this warning if the task is still stopped.
I've edited the changelog like so, please let me know if that is fine
with you.
Thanks.
---
Subject: sched: Remove false-positive warning from wake_up_process()
From: Sasha Levin <sasha.levin@xxxxxxxxxx>
Date: Mon, 30 Nov 2015 20:34:20 -0500
Because wakeups can (fundamentally) be late, a task might not be in
the expected state. Therefore testing against a task's state is racy,
and can yield false positives.
Fixes: 9067ac85d533 ("wake_up_process() should be never used to wakeup a TASK_STOPPED/TRACED task")
Cc: oleg@xxxxxxxxxx
Cc: torvalds@xxxxxxxxxxxxxxxxxxxx
Cc: mingo@xxxxxxxxxx
Signed-off-by: Sasha Levin <sasha.levin@xxxxxxxxxx>
Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Link: http://lkml.kernel.org/r/1448933660-23082-1-git-send-email-sasha.levin@xxxxxxxxxx
---
kernel/sched/core.c | 1 -
1 file changed, 1 deletion(-)
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2160,7 +2160,6 @@ static void try_to_wake_up_local(struct
*/
int wake_up_process(struct task_struct *p)
{
- WARN_ON(task_is_stopped_or_traced(p));
return try_to_wake_up(p, TASK_NORMAL, 0);
}
EXPORT_SYMBOL(wake_up_process);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/