kernel-hacking-2024-linux-s.../arch/mips/kernel
Thomas Gleixner f2545b2d4c jump_label: Reorder hotplug lock and jump_label_lock
The conversion of the hotplug locking to a percpu rwsem unearthed lock
ordering issues all over the place.

The jump_label code has two issues:

 1) Nested get_online_cpus() invocations

 2) Ordering problems vs. the cpus rwsem and the jump_label_mutex

To cure these, the following lock order has been established;

   cpus_rwsem -> jump_label_lock -> text_mutex

Even if not all architectures need protection against CPU hotplug, taking
cpus_rwsem before jump_label_lock is now mandatory in code pathes which
actually modify code and therefor need text_mutex protection.

Move the get_online_cpus() invocations into the core jump label code and
establish the proper lock order where required.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@kernel.org>
Acked-by: "David S. Miller" <davem@davemloft.net>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sebastian Siewior <bigeasy@linutronix.de>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Jason Baron <jbaron@akamai.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Link: http://lkml.kernel.org/r/20170524081549.025830817@linutronix.de
2017-05-26 10:10:45 +02:00
..
.gitignore
8250-platform.c
asm-offsets.c MIPS: IRQ Stack: Unwind IRQ stack onto task stack 2017-03-22 11:53:57 +01:00
binfmt_elfn32.c fs/binfmt: Convert obsolete cputime type to nsecs 2017-02-01 09:13:51 +01:00
binfmt_elfo32.c fs/binfmt: Convert obsolete cputime type to nsecs 2017-02-01 09:13:51 +01:00
bmips_5xxx_init.S MIPS: BMIPS: Make whitespacely correct. 2016-05-09 12:00:01 +02:00
bmips_vec.S MIPS: BMIPS: Add Whirlwind (BMIPS5200) initialization code 2016-05-09 12:00:01 +02:00
branch.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/signal.h> 2017-03-02 08:42:29 +01:00
cacheinfo.c MIPS: Fix cacheinfo overflow 2017-02-13 18:57:34 +00:00
cevt-bcm1480.c MIPS: clockevent drivers: Set ->min_delta_ticks and ->max_delta_ticks 2017-04-14 13:11:16 -07:00
cevt-ds1287.c MIPS: clockevent drivers: Set ->min_delta_ticks and ->max_delta_ticks 2017-04-14 13:11:16 -07:00
cevt-gt641xx.c MIPS: clockevent drivers: Set ->min_delta_ticks and ->max_delta_ticks 2017-04-14 13:11:16 -07:00
cevt-r4k.c MIPS: cevt-r4k: Fix out-of-bounds array access 2017-04-10 13:31:12 +02:00
cevt-sb1250.c MIPS: clockevent drivers: Set ->min_delta_ticks and ->max_delta_ticks 2017-04-14 13:11:16 -07:00
cevt-txx9.c MIPS: clockevent drivers: Set ->min_delta_ticks and ->max_delta_ticks 2017-04-14 13:11:16 -07:00
cps-vec-ns16550.S
cps-vec.S MIPS: smp-cps: Fix retrieval of VPE mask on big endian CPUs 2017-03-21 20:39:40 +01:00
cpu-bugs64.c MIPS: Fix printk continuations in cpu-bugs64.c 2017-01-24 18:30:34 +01:00
cpu-probe.c Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2017-05-12 09:56:30 -07:00
crash.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/task_stack.h> 2017-03-02 08:42:36 +01:00
crash_dump.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
csrc-bcm1480.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
csrc-ioasic.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
csrc-r4k.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
csrc-sb1250.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
early_printk.c
early_printk_8250.c
elf.c MIPS: Avoid BUG warning in arch_check_elf 2017-04-12 15:22:13 +02:00
entry.S MIPS: Remove r2_emul_return from struct thread_info 2017-01-03 16:34:41 +01:00
ftrace.c ftrace: Add return address pointer to ftrace_ret_stack 2016-08-24 12:15:14 +02:00
genex.S MIPS: IRQ Stack: Unwind IRQ stack onto task stack 2017-03-22 11:53:57 +01:00
gpio_txx9.c
head.S MIPS: store the appended dtb address in a variable 2016-08-02 14:00:16 +02:00
i8253.c
idle.c MIPS: Loongson: Add Loongson-3A R2 basic support 2016-05-13 14:02:14 +02:00
irq-gt641xx.c
irq-msc01.c
irq-rm7000.c
irq.c MIPS: Introduce irq_stack 2017-01-03 16:34:34 +01:00
irq_txx9.c
jump_label.c jump_label: Reorder hotplug lock and jump_label_lock 2017-05-26 10:10:45 +02:00
kgdb.c MIPS: KGDB: Use kernel context for sleeping threads 2017-04-12 22:29:22 +02:00
kprobes.c MIPS: tracing: disable uprobe/kprobe on compact branch instructions 2016-10-06 17:37:40 +02:00
linux32.c MIPS: Return directly in 32_mmap2() 2017-01-25 02:51:11 +01:00
machine_kexec.c MIPS: kexec: add debug info about the new kexec'ed image 2017-01-03 16:34:46 +01:00
Makefile MIPS: Export {copy, clear}_page functions alongside their definitions 2017-01-03 16:48:39 +01:00
mcount.S MIPS: Export _mcount alongside its definition 2017-01-03 16:34:49 +01:00
mips-cm.c tree-wide: replace config_enabled() with IS_ENABLED() 2016-08-04 08:50:07 -04:00
mips-cpc.c MIPS: CPC: Provide default mips_cpc_default_phys_base to ignore CPC 2016-11-04 00:17:46 +01:00
mips-mt-fpaff.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/task.h> 2017-03-02 08:42:35 +01:00
mips-mt.c
mips-r2-to-r6-emul.c Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2017-05-12 09:56:30 -07:00
mips_machine.c
module-rela.c MIPS: module: fix incorrect IS_ERR_VALUE macro usages 2016-05-13 14:02:11 +02:00
module.c MIPS: Migrate exception table users off module.h and onto extable.h 2016-10-04 16:13:57 +02:00
octeon_switch.S
perf_event.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/task_stack.h> 2017-03-02 08:42:36 +01:00
perf_event_mipsxx.c cpumask: make "nr_cpumask_bits" unsigned 2017-05-08 17:15:11 -07:00
pm-cps.c cpu/hotplug: Cleanup state names 2016-12-25 10:47:44 +01:00
pm.c MIPS: Fix watchpoint restoration 2016-05-09 12:00:02 +02:00
probes-common.h MIPS: tracing: disable uprobe/kprobe on compact branch instructions 2016-10-06 17:37:40 +02:00
proc.c MIPS: Move identification of VP(E) into proc.c from smp-mt.c 2016-10-04 16:13:57 +02:00
process.c MIPS: Opt into HAVE_COPY_THREAD_TLS 2017-04-12 13:52:21 +02:00
prom.c MIPS: Use early_init_fdt_reserve_self to protect DTB location 2017-01-03 16:34:45 +01:00
ptrace.c Merge branch 'regset' (PTRACE_SETREGSET data leakage) 2017-03-29 08:55:25 -07:00
ptrace32.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/task_stack.h> 2017-03-02 08:42:36 +01:00
r4k_fpu.S MIPS: Use copy_s.fmt rather than copy_u.fmt 2016-05-09 12:00:04 +02:00
r4k_switch.S MIPS: Remove dead define of ST_OFF 2017-04-12 13:52:21 +02:00
r2300_fpu.S MIPS: Correct MIPS I FP sigcontext layout 2016-11-04 01:39:23 +01:00
r2300_switch.S MIPS: Export _save_fp & _save_msa alongside their definitions 2017-01-03 16:34:49 +01:00
r6000_fpu.S MIPS: Fix ISA I/II FP signal context offsets 2016-11-04 01:38:52 +01:00
relocate.c MIPS: KASLR: Add missing header files 2017-04-12 17:02:04 +02:00
relocate_kernel.S
reset.c
rtlx-cmp.c
rtlx-mt.c
rtlx.c sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
scall32-o32.S MIPS: Wire up statx system call 2017-03-08 12:11:13 +01:00
scall64-64.S MIPS: Wire up statx system call 2017-03-08 12:11:13 +01:00
scall64-n32.S MIPS: Wire up statx system call 2017-03-08 12:11:13 +01:00
scall64-o32.S MIPS: Wire up statx system call 2017-03-08 12:11:13 +01:00
segment.c MIPS: Print segment physical address when EU=1 2016-07-28 11:44:30 +02:00
setup.c MIPS: kexec: Do not reserve invalid crashkernel memory on boot 2017-01-03 16:34:46 +01:00
signal-common.h
signal.c Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2016-08-06 09:13:11 -04:00
signal32.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
signal_n32.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
signal_o32.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/signal.h> 2017-03-02 08:42:29 +01:00
smp-bmips.c MIPS: Add missing include files 2017-03-08 10:38:06 +01:00
smp-cmp.c
smp-cps.c Merge branch '4.11-fixes' into mips-for-linux-next 2017-04-13 00:48:47 +02:00
smp-mt.c MIPS: smp-mt: Use CPU interrupt controller IPI IRQ domain support 2017-04-12 23:13:13 +02:00
smp-up.c
smp.c MIPS: Stengthen IPI IRQ domain sanity check 2017-04-12 23:13:44 +02:00
spinlock_test.c
spram.c MIPS: Add P6600 cases to CPU switch statements 2016-05-13 14:01:52 +02:00
stacktrace.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/task_stack.h> 2017-03-02 08:42:36 +01:00
sync-r4k.c MIPS: sync-r4k: Fix KERN_CONT fallout 2017-02-13 18:58:39 +00:00
syscall.c mips: sanitize __access_ok() 2017-04-06 02:08:06 -04:00
sysrq.c
time.c KVM: MIPS: Implement VZ support 2017-03-28 14:53:54 +01:00
topology.c
traps.c format-security: move static strings to const 2017-05-08 17:15:14 -07:00
unaligned.c new helper: uaccess_kernel() 2017-03-28 16:43:25 -04:00
uprobes.c MIPS: uprobes: Remove __weak attribute from arch_uprobe_copy_ixol. 2017-01-03 16:34:48 +01:00
vdso.c userfaultfd: non-cooperative: add event for memory unmaps 2017-02-24 17:46:55 -08:00
vmlinux.lds.S debug: Fix __bug_table[] in arch linker scripts 2017-04-03 10:22:40 +02:00
vpe-cmp.c
vpe-mt.c
vpe.c
watch.c MIPS: Add and use watch register field definitions 2016-05-13 14:02:13 +02:00