android_kernel_xiaomi_sm8350/include
Daniel Thompson 4f1a132115 kgdb: Fix spurious true from in_dbg_master()
[ Upstream commit 3fec4aecb311995189217e64d725cfe84a568de3 ]

Currently there is a small window where a badly timed migration could
cause in_dbg_master() to spuriously return true. Specifically if we
migrate to a new core after reading the processor id and the previous
core takes a breakpoint then we will evaluate true if we read
kgdb_active before we get the IPI to bring us to halt.

Fix this by checking irqs_disabled() first. Interrupts are always
disabled when we are executing the kgdb trap so this is an acceptable
prerequisite. This also allows us to replace raw_smp_processor_id()
with smp_processor_id() since the short circuit logic will prevent
warnings from PREEMPT_DEBUG.

Fixes: dcc7871128 ("kgdb: core changes to support kdb")
Suggested-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20200506164223.2875760-1-daniel.thompson@linaro.org
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-22 09:31:03 +02:00
..
acpi x86: ACPI: fix CPU hotplug deadlock 2020-04-23 10:36:38 +02:00
asm-generic bpf: Support llvm-objcopy for vmlinux BTF 2020-06-17 16:40:20 +02:00
clocksource
crypto
drm drm/bridge: analogix_dp: Split bind() into probe() and real bind() 2020-05-10 10:31:22 +02:00
dt-bindings
keys KEYS: Don't write out to userspace while holding key semaphore 2020-04-23 10:36:45 +02:00
kvm
linux kgdb: Fix spurious true from in_dbg_master() 2020-06-22 09:31:03 +02:00
math-emu
media
misc
net dccp: Fix possible memleak in dccp_init and dccp_fini 2020-06-17 16:40:32 +02:00
pcmcia
ras
rdma RDMA/core: Fix double destruction of uobject 2020-06-03 08:21:25 +02:00
scsi
soc
sound ALSA: hda: Manage concurrent reg access more properly 2020-05-27 17:46:37 +02:00
target scsi: target: fix hang when multiple threads try to destroy the same iscsi session 2020-04-21 09:05:04 +02:00
trace rxrpc: Trace discarded ACKs 2020-05-27 17:46:51 +02:00
uapi x86/kvm/hyper-v: Explicitly align hcall param for kvm_hyperv_exit 2020-06-22 09:30:57 +02:00
vdso
video
xen