android_kernel_oneplus_msm8998/arch
Stephen Boyd 78c34e6ea3 ARM: smp: Fix hrtimer_interrupt race with sys_reboot
There are high chances for hrtimer_interrupt() interrupt on
one of the core and other core executing sys_reboot simultaneously.
In such a situation we could see ipi_cpu_stop() marking a cpu
as 'offline' but hrtimer_wakeup() can schedule a task on
offline core, resulting BUG_ON in smp_send_reschedule().
In fact that the CPU is not really offline but ipi_cpu_stop()
is marking it as offline.
CPU0                      CPU1				CPU2
sys_reboot()
 kernel_restart()
  machine_restart()
   machine_shutdown()
    smp_send_stop()					...
    ...                   ipi_cpu_stop()		hrtimer_interrupt()
                           set_cpu_online(1, false)	 __run_hrtimer()
                            local_irq_disable()		  hrtimer_wakeup()
                             while(1)			   try_to_wake_up()
							    ttwu_do_wakeup()
							     check_preempt_curr()
							      smp_send_reschedule()
							       BUG_ON(cpu_is_offline(1));

This is easily reproducible in device continuous reboot testing.
Since the CPU is not really offline and hasn't gone through the
proper steps to be marked as such, let's mark the CPU as inactive.

Change-Id: Ia1daea407220578d4212ef6c65c4be837ca370fd
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-03-25 16:02:57 -07:00
..
alpha Revert "net, lib: kill arch_fast_hash library bits" 2016-03-22 11:09:36 -07:00
arc Revert "net, lib: kill arch_fast_hash library bits" 2016-03-22 11:09:36 -07:00
arm ARM: smp: Fix hrtimer_interrupt race with sys_reboot 2016-03-25 16:02:57 -07:00
arm64 defconfig: Enable SPS BAM and USB BAM driver on msmcobalt 2016-03-23 21:30:45 -07:00
avr32 Revert "net, lib: kill arch_fast_hash library bits" 2016-03-22 11:09:36 -07:00
blackfin Revert "net, lib: kill arch_fast_hash library bits" 2016-03-22 11:09:36 -07:00
c6x Revert "net, lib: kill arch_fast_hash library bits" 2016-03-22 11:09:36 -07:00
cris
frv Revert "net, lib: kill arch_fast_hash library bits" 2016-03-22 11:09:36 -07:00
h8300 h8300 update for v4.4 2015-11-12 15:26:39 -08:00
hexagon Revert "net, lib: kill arch_fast_hash library bits" 2016-03-22 11:09:36 -07:00
ia64 Revert "net, lib: kill arch_fast_hash library bits" 2016-03-22 11:09:36 -07:00
m32r Merge remote-tracking branch 'lsk-44/linux-linaro-lsk-v4.4' into 44rc2 2016-03-23 20:51:00 -07:00
m68k m68k: Wire up mlock2 2015-11-22 11:35:26 +01:00
metag Revert "net, lib: kill arch_fast_hash library bits" 2016-03-22 11:09:36 -07:00
microblaze Revert "scatterlist: use sg_phys()" 2016-03-22 11:15:33 -07:00
mips Revert "net, lib: kill arch_fast_hash library bits" 2016-03-22 11:09:36 -07:00
mn10300 Revert "net, lib: kill arch_fast_hash library bits" 2016-03-22 11:09:36 -07:00
nios2 nios2: fix cache coherency 2015-11-26 22:25:58 +08:00
openrisc Revert "net, lib: kill arch_fast_hash library bits" 2016-03-22 11:09:36 -07:00
parisc Merge remote-tracking branch 'lsk-44/linux-linaro-lsk-v4.4' into 44rc2 2016-03-23 20:51:00 -07:00
powerpc KVM: PPC: Fix ONE_REG AltiVec support 2016-02-25 12:01:20 -08:00
s390 Revert "net, lib: kill arch_fast_hash library bits" 2016-03-22 11:09:36 -07:00
score Revert "net, lib: kill arch_fast_hash library bits" 2016-03-22 11:09:36 -07:00
sh Revert "net, lib: kill arch_fast_hash library bits" 2016-03-22 11:09:36 -07:00
sparc Revert "net, lib: kill arch_fast_hash library bits" 2016-03-22 11:09:36 -07:00
tile Revert "net, lib: kill arch_fast_hash library bits" 2016-03-22 11:09:36 -07:00
um UM: x86_64: add defconfig file for UML on x86_64 2016-03-23 21:16:30 -07:00
unicore32 Revert "net, lib: kill arch_fast_hash library bits" 2016-03-22 11:09:36 -07:00
x86 Merge remote-tracking branch 'lsk-44/linux-linaro-lsk-v4.4' into 44rc2 2016-03-23 20:51:00 -07:00
xtensa Revert "net, lib: kill arch_fast_hash library bits" 2016-03-22 11:09:36 -07:00
.gitignore
Kconfig FROMLIST: mm: mmap: Add new /proc tunable for mmap_base ASLR. 2016-02-16 13:54:14 -08:00