Files
linux/kernel
Chen Liang a6afe518a8 sched/fair: fix bug: remove printk while schedule is in progress
It will cause deadlock and while(1) if call printk while schedule
is in progress. The block state like as below:

cpu0(hold the console sem):
printk->console_unlock->up_sem->spin_lock(&sem->lock)->wake_up_process(cpu1)
->try_to_wake_up(cpu1)->while(p->on_cpu).

cpu1(request console sem):
console_lock->down_sem->schedule->idle_banlance->update_cpu_capacity->
printk->console_trylock->spin_lock(&sem->lock).

p->on_cpu will be 1 forever, because the task is still running on cpu1,
so cpu0 is blocked in while(p->on_cpu), but cpu1 could not get
spin_lock(&sem->lock), it is blocked too, it means the task will running
on cpu1 forever.

Change-Id: I60d02d8c957273872f97939632bdd235accdad4e
Signed-off-by: Chen Liang <cl@rock-chips.com>
2019-02-27 20:45:07 +08:00
..
2019-01-09 18:55:03 +01:00
2018-12-08 13:24:30 +01:00
2018-12-06 10:34:09 +01:00
2017-05-18 10:30:19 -06:00
2018-04-27 14:34:51 +02:00
2019-01-13 09:51:04 +01:00
2018-12-29 13:37:57 +01:00
2018-01-05 18:43:00 +11:00
2019-01-13 09:51:06 +01:00
2018-07-03 09:20:44 +02:00
2018-06-07 16:56:28 -04:00