android_kernel_oneplus_msm8998/arch/x86/oprofile
Borislav Petkov b01f1d60dd x86/oprofile/ppro: Do not use __this_cpu*() in preemptible context
commit a743bbeef27b9176987ec0cb7f906ab0ab52d1da upstream.

The warning below says it all:

  BUG: using __this_cpu_read() in preemptible [00000000] code: swapper/0/1
  caller is __this_cpu_preempt_check
  CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.0-rc8 #4
  Call Trace:
   dump_stack
   check_preemption_disabled
   ? do_early_param
   __this_cpu_preempt_check
   arch_perfmon_init
   op_nmi_init
   ? alloc_pci_root_info
   oprofile_arch_init
   oprofile_init
   do_one_initcall
   ...

These accessors should not have been used in the first place: it is PPro so
no mixed silicon revisions and thus it can simply use boot_cpu_data.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Tested-by: Fengguang Wu <fengguang.wu@intel.com>
Fix-creation-mandated-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Robert Richter <rric@kernel.org>
Cc: x86@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-15 17:13:14 +01:00
..
backtrace.c x86/asm/entry: Change all 'user_mode_vm()' calls to 'user_mode()' 2015-03-23 11:14:17 +01:00
init.c oprofile, x86: Reimplement nmi timer mode using perf event 2011-11-04 16:27:18 +01:00
Makefile oprofile, x86: Reimplement nmi timer mode using perf event 2011-11-04 16:27:18 +01:00
nmi_int.c x86: Replace __get_cpu_var uses 2014-08-26 13:45:49 -04:00
op_counter.h
op_model_amd.c oprofilefs_create_...() do not need superblock argument 2013-09-03 22:52:48 -04:00
op_model_p4.c percpu: Resolve ambiguities in __get_cpu_var/cpumask_var_t 2014-08-28 08:58:57 -04:00
op_model_ppro.c x86/oprofile/ppro: Do not use __this_cpu*() in preemptible context 2017-11-15 17:13:14 +01:00
op_x86_model.h