android_kernel_motorola_sm6375/arch
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Paul E. McKenney 69d4f3baa6 x86/smpboot: Move rcu_cpu_starting() earlier
commit 29368e09392123800e5e2bf0f3eda91f16972e52 upstream.

The call to rcu_cpu_starting() in mtrr_ap_init() is not early enough
in the CPU-hotplug onlining process, which results in lockdep splats
as follows:

=============================
WARNING: suspicious RCU usage
5.9.0+ #268 Not tainted
-----------------------------
kernel/kprobes.c:300 RCU-list traversed in non-reader section!!

other info that might help us debug this:

RCU used illegally from offline CPU!
rcu_scheduler_active = 1, debug_locks = 1
no locks held by swapper/1/0.

stack backtrace:
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.9.0+ #268
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.10.2-1ubuntu1 04/01/2014
Call Trace:
 dump_stack+0x77/0x97
 __is_insn_slot_addr+0x15d/0x170
 kernel_text_address+0xba/0xe0
 ? get_stack_info+0x22/0xa0
 __kernel_text_address+0x9/0x30
 show_trace_log_lvl+0x17d/0x380
 ? dump_stack+0x77/0x97
 dump_stack+0x77/0x97
 __lock_acquire+0xdf7/0x1bf0
 lock_acquire+0x258/0x3d0
 ? vprintk_emit+0x6d/0x2c0
 _raw_spin_lock+0x27/0x40
 ? vprintk_emit+0x6d/0x2c0
 vprintk_emit+0x6d/0x2c0
 printk+0x4d/0x69
 start_secondary+0x1c/0x100
 secondary_startup_64_no_verify+0xb8/0xbb

This is avoided by moving the call to rcu_cpu_starting up near
the beginning of the start_secondary() function.  Note that the
raw_smp_processor_id() is required in order to avoid calling into lockdep
before RCU has declared the CPU to be watched for readers.

Link: https://lore.kernel.org/lkml/160223032121.7002.1269740091547117869.tip-bot2@tip-bot2/
Reported-by: Qian Cai <cai@redhat.com>
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Joel Fernandes <joel@joelfernandes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-12-19 12:24:15 +01:00
..
alpha tty: the rest, stop using tty_schedule_flip() 2022-07-29 17:14:19 +02:00
arc arc: iounmap() arg is volatile 2022-11-03 23:56:54 +09:00
arm ARM: dts: rockchip: disable arm_global_timer on rk3066 and rk3188 2022-12-14 11:30:40 +01:00
arm64 arm64: dts: rockchip: keep I2S1 disabled for GPIO function on ROCK Pi 4 series 2022-12-14 11:30:40 +01:00
c6x
csky
h8300
hexagon
ia64 ia64, processor: fix -Wincompatible-pointer-types in ia64_get_irr() 2022-08-25 11:17:25 +02:00
m68k m68k: use fallback for random_get_entropy() instead of zero 2022-06-22 14:11:15 +02:00
microblaze
mips MIPS: pic32: treat port as signed integer 2022-12-08 11:22:57 +01:00
nds32
nios2 nios2: add FORCE for vmlinuz.gz 2022-12-08 11:22:59 +01:00
openrisc openrisc: start CPU timer early in boot 2022-06-14 18:11:28 +02:00
parisc parisc: Avoid printing the hardware path twice 2022-11-10 17:57:56 +01:00
powerpc powerpc: Fix SPE Power ISA properties for e500v1 platforms 2022-10-26 13:22:45 +02:00
riscv RISC-V: vdso: Do not add missing symbols to version section in linker script 2022-12-08 11:22:57 +01:00
s390 KVM: s390: vsie: Fix the initialization of the epoch extension (epdx) field 2022-12-14 11:30:43 +01:00
sh sh: machvec: Use char[] for section boundaries 2022-10-26 13:22:21 +02:00
sparc sparc: use fallback for random_get_entropy() instead of zero 2022-06-22 14:11:15 +02:00
um UM: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK 2022-10-26 13:22:16 +02:00
unicore32
x86 x86/smpboot: Move rcu_cpu_starting() earlier 2022-12-19 12:24:15 +01:00
xtensa xtensa: Fix refcount leak bug in time.c 2022-06-29 08:58:48 +02:00
.gitignore
Kconfig locking/refcount: Consolidate implementations of refcount_t 2022-07-29 17:14:17 +02:00