From: Peter Zijlstra <peterz@infradead.org>
To: Sasha Levin <sasha.levin@oracle.com>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org, oleg@redhat.com,
torvalds@linux-foundation.org
Subject: Re: [PATCH] sched: remove false-positive warning from wake_up_process()
Date: Thu, 3 Dec 2015 13:36:50 +0100 [thread overview]
Message-ID: <20151203123650.GZ3816@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1448933660-23082-1-git-send-email-sasha.levin@oracle.com>
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@oracle.com>
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@redhat.com
Cc: torvalds@linux-foundation.org
Cc: mingo@redhat.com
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1448933660-23082-1-git-send-email-sasha.levin@oracle.com
---
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);
next prev parent reply other threads:[~2015-12-03 12:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-01 1:34 [PATCH] sched: remove false-positive warning from wake_up_process() Sasha Levin
2015-12-01 1:47 ` Linus Torvalds
2015-12-01 2:48 ` Rik van Riel
2015-12-01 3:14 ` Linus Torvalds
2015-12-03 12:36 ` Peter Zijlstra [this message]
2015-12-03 18:18 ` Linus Torvalds
2015-12-04 11:52 ` [tip:locking/core] sched/core: Remove " tip-bot for Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151203123650.GZ3816@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=oleg@redhat.com \
--cc=sasha.levin@oracle.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox