public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Peter Zijlstra <peterz@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	linux-rt-users <linux-rt-users@vger.kernel.org>,
	Sebastian Sewior <bigeasy@linutronix.de>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathias Koehrer <mathias.koehrer@etas.com>,
	David Hauck <davidh@netacquire.com>
Subject: Re: [PATCH RT V2] sched: Prevent task state corruption by spurious lock wakeup
Date: Tue, 6 Jun 2017 20:35:53 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1706062035270.2308@nanos> (raw)
In-Reply-To: <20170606162815.jdurd7xa75fw57g7@hirez.programming.kicks-ass.net>

On Tue, 6 Jun 2017, Peter Zijlstra wrote:

> On Tue, Jun 06, 2017 at 02:20:37PM +0200, Thomas Gleixner wrote:
> > --- a/kernel/sched/core.c
> > +++ b/kernel/sched/core.c
> > @@ -2210,7 +2210,7 @@ EXPORT_SYMBOL(wake_up_process);
> >   */
> >  int wake_up_lock_sleeper(struct task_struct *p)
> >  {
> > -	return try_to_wake_up(p, TASK_ALL, WF_LOCK_SLEEPER);
> > +	return try_to_wake_up(p, TASK_UNINTERRUPTIBLE, WF_LOCK_SLEEPER);
> >  }
> >  
> >  int wake_up_state(struct task_struct *p, unsigned int state)
> 
> Do we want this?

Definitely.

> ---
> Subject: sched: Remove TASK_ALL
> 
> It's unused:
> 
> $ git grep "\<TASK_ALL\>" | wc -l
> 1
> 
> And dangerous, kill the bugger.
> 
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>

Acked-by: Thomas Gleixner <tglx@linutronix.de>

> ---
> diff --git a/include/linux/sched.h b/include/linux/sched.h
> index 3dfa5f99d6ee..e88aadbe2071 100644
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -94,7 +94,6 @@ struct task_group;
>  
>  /* Convenience macros for the sake of wake_up(): */
>  #define TASK_NORMAL			(TASK_INTERRUPTIBLE | TASK_UNINTERRUPTIBLE)
> -#define TASK_ALL			(TASK_NORMAL | __TASK_STOPPED | __TASK_TRACED)
>  
>  /* get_task_state(): */
>  #define TASK_REPORT			(TASK_RUNNING | TASK_INTERRUPTIBLE | \
> 

  reply	other threads:[~2017-06-06 18:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-02 16:40 [PATCH RT] sched: Prevent task state corruption by spurious lock wakeup Thomas Gleixner
2017-06-02 17:25 ` David Hauck
2017-06-03  7:47 ` Thomas Gleixner
2017-06-06 12:16   ` Thomas Gleixner
2017-06-06 12:20     ` [PATCH RT V2] " Thomas Gleixner
2017-06-06 16:28       ` Peter Zijlstra
2017-06-06 18:35         ` Thomas Gleixner [this message]
2017-06-07 20:18         ` Sebastian Sewior
2017-06-07 20:18       ` Sebastian Sewior

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=alpine.DEB.2.20.1706062035270.2308@nanos \
    --to=tglx@linutronix.de \
    --cc=bigeasy@linutronix.de \
    --cc=davidh@netacquire.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mathias.koehrer@etas.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.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