lkml.org 
[lkml]   [2018]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: cpu stopper threads and setaffinity leads to deadlock
From
Date
On Thu, 2018-08-02 at 10:12 +0200, Peter Zijlstra wrote:
> On Wed, Aug 01, 2018 at 06:34:40PM -0700, Sodagudi Prasad wrote:
> > diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
> > index e190d1e..f932e1e 100644
> > --- a/kernel/stop_machine.c
> > +++ b/kernel/stop_machine.c
> > @@ -87,9 +87,9 @@ static bool cpu_stop_queue_work(unsigned int cpu, struct
> > cpu_stop_work *work)
> > __cpu_stop_queue_work(stopper, work, &wakeq);
> > else if (work->done)
> > cpu_stop_signal_done(work->done);
> > - raw_spin_unlock_irqrestore(&stopper->lock, flags);
> >
> > wake_up_q(&wakeq);
> > + raw_spin_unlock_irqrestore(&stopper->lock, flags);
> >
>
> That puts the wakeup back under stopper lock, which causes another
> deadlock iirc.

Yup, one you fixed.

0b26351b910fb (Peter Zijlstra 2018-04-20 11:50:05 +0200 92) wake_up_q(&wakeq);

\
 
 \ /
  Last update: 2018-08-02 10:28    [W:0.068 / U:0.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site