android_kernel_motorola_sm6375/drivers/firmware
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Guilherme G. Piccoli c969316eee firmware: google: Test spinlock on panic path to avoid lockups
[ Upstream commit 3e081438b8e639cc76ef1a5ce0c1bd8a154082c7 ]

Currently the gsmi driver registers a panic notifier as well as
reboot and die notifiers. The callbacks registered are called in
atomic and very limited context - for instance, panic disables
preemption and local IRQs, also all secondary CPUs (not executing
the panic path) are shutdown.

With that said, taking a spinlock in this scenario is a dangerous
invitation for lockup scenarios. So, fix that by checking if the
spinlock is free to acquire in the panic notifier callback - if not,
bail-out and avoid a potential hang.

Fixes: 74c5b31c66 ("driver: Google EFI SMI")
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: David Gow <davidgow@google.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Julius Werner <jwerner@chromium.org>
Cc: Petr Mladek <pmladek@suse.com>
Reviewed-by: Evan Green <evgreen@chromium.org>
Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
Link: https://lore.kernel.org/r/20220909200755.189679-1-gpiccoli@igalia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-10-26 13:22:40 +02:00
..
arm_scmi firmware: arm_scmi: Add SCMI PM driver remove routine 2022-10-15 07:54:37 +02:00
broadcom
efi efi: libstub: check Shim mode using MokSBStateRT 2022-09-28 11:04:04 +02:00
google firmware: google: Test spinlock on panic path to avoid lockups 2022-10-26 13:22:40 +02:00
imx
meson
psci arm/arm64: smccc/psci: add arm_smccc_1_1_get_conduit() 2022-03-11 11:22:37 +01:00
tegra firmware: tegra: bpmp: Fix Tegra234-only builds 2021-07-25 14:35:12 +02:00
xilinx
arm_scpi.c firmware: arm_scpi: Ensure scpi_info is not assigned if the probe fails 2022-08-25 11:18:15 +02:00
arm_sdei.c
dmi-id.c
dmi-sysfs.c firmware: dmi-sysfs: Fix memory leak in dmi_sysfs_register_handle 2022-06-14 18:11:54 +02:00
dmi_scan.c
edd.c
iscsi_ibft.c
iscsi_ibft_find.c
Kconfig
Makefile
memmap.c
pcdp.c
pcdp.h
qcom_scm-32.c
qcom_scm-64.c
qcom_scm.c
qcom_scm.h
qemu_fw_cfg.c firmware: qemu_fw_cfg: fix kobject leak in probe error path 2022-01-20 09:19:18 +01:00
raspberrypi.c
scpi_pm_domain.c firmware: arm_scpi: Fix string overflow in SCPI genpd driver 2021-12-22 09:29:34 +01:00
stratix10-rsu.c
stratix10-svc.c firmware: stratix10-svc: fix a missing check on list iterator 2022-06-14 18:11:52 +02:00
ti_sci.c
ti_sci.h
trusted_foundations.c
turris-mox-rwtm.c firmware: turris-mox-rwtm: add marvell,armada-3700-rwtm-firmware compatible string 2021-07-25 14:35:13 +02:00