[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1808031340500.1745@nanos.tec.linutronix.de>
Date: Fri, 3 Aug 2018 13:41:13 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Peter Zijlstra <peterz@...radead.org>
cc: Sodagudi Prasad <psodagud@...eaurora.org>, mingo@...nel.org,
gregkh@...uxfoundation.org, bigeasy@...utronix.de,
isaacm@...eaurora.org, linux-kernel@...r.kernel.org
Subject: Re: cpu stopper threads and setaffinity leads to deadlock
Prasad.
On Thu, 2 Aug 2018, Peter Zijlstra wrote:
>
> So why didn't you do the 'obvious' parallel to what you did for
> cpu_stop_queue_two_works(), namely:
Is that patch fixing the issue for you?
> --- a/kernel/stop_machine.c
> +++ b/kernel/stop_machine.c
> @@ -81,6 +81,7 @@ static bool cpu_stop_queue_work(unsigned
> unsigned long flags;
> bool enabled;
>
> + preempt_disable();
> raw_spin_lock_irqsave(&stopper->lock, flags);
> enabled = stopper->enabled;
> if (enabled)
> @@ -90,6 +91,7 @@ static bool cpu_stop_queue_work(unsigned
> raw_spin_unlock_irqrestore(&stopper->lock, flags);
>
> wake_up_q(&wakeq);
> + preempt_enable();
>
> return enabled;
> }
>
Powered by blists - more mailing lists