Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1659047

Re: [PATCH RT V2] sched: Prevent task state corruption by spurious lock wakeup

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH RT V2] sched: Prevent task state corruption by spurious lock wakeup
Date 2017-06-06 20:40 +0200
Message-ID <tPryy-41R-17@gated-at.bofh.it> (permalink)
References <tNXVT-3GU-13@gated-at.bofh.it> <tObYR-49h-3@gated-at.bofh.it> <tPlCN-el-1@gated-at.bofh.it> <tPlMw-hV-61@gated-at.bofh.it> <tPpwK-2JZ-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 | \
> 

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH RT] sched: Prevent task state corruption by spurious lock  wakeup Thomas Gleixner <tglx@linutronix.de> - 2017-06-02 18:50 +0200
  RE: [PATCH RT] sched: Prevent task state corruption by spurious  lock wakeup David Hauck <davidh@netacquire.com> - 2017-06-02 19:40 +0200
  Re: [PATCH RT] sched: Prevent task state corruption by spurious lock  wakeup Thomas Gleixner <tglx@linutronix.de> - 2017-06-03 09:50 +0200
    Re: [PATCH RT] sched: Prevent task state corruption by spurious lock  wakeup Thomas Gleixner <tglx@linutronix.de> - 2017-06-06 14:20 +0200
      [PATCH RT V2] sched: Prevent task state corruption by spurious lock  wakeup Thomas Gleixner <tglx@linutronix.de> - 2017-06-06 14:30 +0200
        Re: [PATCH RT V2] sched: Prevent task state corruption by spurious  lock wakeup Peter Zijlstra <peterz@infradead.org> - 2017-06-06 18:30 +0200
          Re: [PATCH RT V2] sched: Prevent task state corruption by spurious  lock wakeup Thomas Gleixner <tglx@linutronix.de> - 2017-06-06 20:40 +0200

csiph-web