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
..
bpf bpf: fix inner map masking to prevent oob under speculation 2019-01-31 08:14:41 +01:00
cgroup This is the 4.19.14 stable release 2019-01-09 18:55:03 +01:00
configs
debug
dma dma-direct: do not include SME mask in the DMA supported check 2019-01-13 09:51:05 +01:00
events
gcov
irq
livepatch
locking
power PM / Sleep: Add wake lock api wrapper on top of wakeup sources 2019-02-26 11:21:22 +08:00
printk
rcu srcu: Lock srcu_data structure in srcu_gp_start() 2019-01-13 09:51:06 +01:00
sched sched/fair: fix bug: remove printk while schedule is in progress 2019-02-27 20:45:07 +08:00
time posix-cpu-timers: Unbreak timer rearming 2019-01-31 08:14:39 +01:00
trace
.gitignore
acct.c
async.c
audit_fsnotify.c
audit_tree.c
audit_watch.c
audit.c
audit.h
auditfilter.c
auditsc.c
backtracetest.c
bounds.c
capability.c
compat.c
configs.c
context_tracking.c
cpu_pm.c
cpu.c
crash_core.c
crash_dump.c
cred.c
delayacct.c
dma.c
elfcore.c
exec_domain.c
exit.c kernel/exit.c: release ptraced tasks before zap_pid_ns_processes 2019-02-06 17:30:14 +01:00
extable.c
fail_function.c
fork.c fork: record start_time late 2019-01-13 09:51:04 +01:00
freezer.c
futex_compat.c
futex.c
groups.c
hung_task.c
iomem.c
irq_work.c
jump_label.c
kallsyms.c
kcmp.c
Kconfig.freezer
Kconfig.hz
Kconfig.locks
Kconfig.preempt
kcov.c
kexec_core.c
kexec_file.c
kexec_internal.h
kexec.c
kmod.c
kprobes.c
ksysfs.c
kthread.c
latencytop.c
Makefile
memremap.c mm, devm_memremap_pages: add MEMORY_DEVICE_PRIVATE support 2019-01-13 09:51:04 +01:00
module_signing.c
module-internal.h
module.c
notifier.c
nsproxy.c
padata.c
panic.c
params.c
pid_namespace.c
pid.c Fix failure path in alloc_pid() 2019-01-13 09:51:06 +01:00
profile.c
ptrace.c
range.c
reboot.c
relay.c
resource.c
rseq.c
seccomp.c
signal.c
smp.c
smpboot.c
smpboot.h
softirq.c
stacktrace.c
stop_machine.c
sys_ni.c
sys.c
sysctl_binary.c
sysctl.c
task_work.c
taskstats.c
test_kprobes.c
torture.c
tracepoint.c
tsacct.c
ucount.c
uid16.c
uid16.h
umh.c
up.c
user_namespace.c
user-return-notifier.c
user.c
utsname_sysctl.c
utsname.c
watchdog_hld.c
watchdog.c
workqueue_internal.h
workqueue.c