linux-stable/arch
Peter Zijlstra 3b5f6045f9 x86/extable: Fix ex_handler_msr() print condition
[ Upstream commit a1a5482a2c ]

On Fri, Jun 17, 2022 at 02:08:52PM +0300, Stephane Eranian wrote:
> Some changes to the way invalid MSR accesses are reported by the
> kernel is causing some problems with messages printed on the
> console.
>
> We have seen several cases of ex_handler_msr() printing invalid MSR
> accesses once but the callstack multiple times causing confusion on
> the console.

> The problem here is that another earlier commit (5.13):
>
> a358f40600 ("once: implement DO_ONCE_LITE for non-fast-path "do once" functionality")
>
> Modifies all the pr_*_once() calls to always return true claiming
> that no caller is ever checking the return value of the functions.
>
> This is why we are seeing the callstack printed without the
> associated printk() msg.

Extract the ONCE_IF(cond) part into __ONCE_LTE_IF() and use that to
implement DO_ONCE_LITE_IF() and fix the extable code.

Fixes: a358f40600 ("once: implement DO_ONCE_LITE for non-fast-path "do once" functionality")
Reported-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Stephane Eranian <eranian@google.com>
Link: https://lkml.kernel.org/r/YqyVFsbviKjVGGZ9@worktop.programming.kicks-ass.net
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-08-17 14:40:41 +02:00
..
alpha alpha: fix alloc_zeroed_user_highpage_movable() 2022-06-09 10:29:51 +02:00
arc
arm ARM: dts: qcom: msm8974: Disable remoteprocs by default 2022-08-17 14:40:40 +02:00
arm64 arm64: dts: qcom: qcs404: Fix incorrect USB2 PHYs assignment 2022-08-17 14:40:40 +02:00
csky csky: patch_text: Fixup last cpu should be master 2022-06-09 10:30:50 +02:00
h8300
hexagon
ia64 ia64: fix typos in comments 2022-08-17 14:40:35 +02:00
m68k m68knommu: fix undefined reference to `mach_get_rtc_pll' 2022-06-14 18:45:03 +02:00
microblaze
mips MIPS: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK 2022-08-17 14:40:18 +02:00
nios2
openrisc openrisc: start CPU timer early in boot 2022-06-09 10:29:44 +02:00
parisc parisc: io_pgetevents_time64() needs compat syscall in 32-bit compat mode 2022-08-17 14:40:09 +02:00
powerpc powerpc/64s: Disable stack variable initialisation for prom_init 2022-08-17 14:40:27 +02:00
riscv RISC-V: Add modules to virtual kernel memory layout dump 2022-08-17 14:40:11 +02:00
s390 KVM: s390: pv: don't present the ecall interrupt twice 2022-08-17 14:40:05 +02:00
sh sh: convert nommu io{re,un}map() to static inline functions 2022-07-22 10:21:22 +02:00
sparc signal: Deliver SIGTRAP on perf event asynchronously if blocked 2022-06-09 10:30:00 +02:00
um um: seed rng using host OS rng 2022-08-17 14:40:14 +02:00
x86 x86/extable: Fix ex_handler_msr() print condition 2022-08-17 14:40:41 +02:00
xtensa xtensa: Fix refcount leak bug in time.c 2022-06-29 09:04:40 +02:00
.gitignore
Kconfig arch: make TRACE_IRQFLAGS_NMI_SUPPORT generic 2022-08-17 14:40:20 +02:00