Loading kernel/stop_machine.c +9 −1 Original line number Diff line number Diff line Loading @@ -260,6 +260,15 @@ static int cpu_stop_queue_two_works(int cpu1, struct cpu_stop_work *work1, err = 0; __cpu_stop_queue_work(stopper1, work1, &wakeq); __cpu_stop_queue_work(stopper2, work2, &wakeq); /* * The waking up of stopper threads has to happen * in the same scheduling context as the queueing. * Otherwise, there is a possibility of one of the * above stoppers being woken up by another CPU, * and preempting us. This will cause us to not * wake up the other stopper forever. */ preempt_disable(); unlock: spin_unlock(&stopper2->lock); spin_unlock_irq(&stopper1->lock); Loading @@ -271,7 +280,6 @@ static int cpu_stop_queue_two_works(int cpu1, struct cpu_stop_work *work1, } if (!err) { preempt_disable(); wake_up_q(&wakeq); preempt_enable(); } Loading Loading
kernel/stop_machine.c +9 −1 Original line number Diff line number Diff line Loading @@ -260,6 +260,15 @@ static int cpu_stop_queue_two_works(int cpu1, struct cpu_stop_work *work1, err = 0; __cpu_stop_queue_work(stopper1, work1, &wakeq); __cpu_stop_queue_work(stopper2, work2, &wakeq); /* * The waking up of stopper threads has to happen * in the same scheduling context as the queueing. * Otherwise, there is a possibility of one of the * above stoppers being woken up by another CPU, * and preempting us. This will cause us to not * wake up the other stopper forever. */ preempt_disable(); unlock: spin_unlock(&stopper2->lock); spin_unlock_irq(&stopper1->lock); Loading @@ -271,7 +280,6 @@ static int cpu_stop_queue_two_works(int cpu1, struct cpu_stop_work *work1, } if (!err) { preempt_disable(); wake_up_q(&wakeq); preempt_enable(); } Loading