Files
twx-linux/include/linux
Daniel Thompson fb228bf21e kgdb: Fix spurious true from in_dbg_master()
[ Upstream commit 3fec4aecb3 ]

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-20 10:24:16 +02:00
..
2017-10-08 10:26:06 +02:00
2018-04-24 09:34:18 +02:00
2018-02-28 10:18:33 +01:00
2019-03-23 13:19:52 +01:00
2019-11-25 09:53:14 +01:00
2020-05-20 08:15:37 +02:00
2020-04-02 17:20:27 +02:00
2018-10-10 08:53:18 +02:00
2020-04-02 17:20:40 +02:00
2020-03-20 09:07:43 +01:00
2020-04-24 07:58:54 +02:00
2020-04-02 17:20:39 +02:00
2019-11-10 11:23:31 +01:00
2019-04-17 08:36:39 +02:00
2018-11-13 11:17:02 -08:00
2019-06-17 19:53:32 +02:00
2020-05-20 08:15:37 +02:00
2018-11-27 16:09:41 +01:00
2017-12-25 14:23:37 +01:00
2020-04-02 17:20:39 +02:00
2018-12-05 19:42:42 +01:00