linux/drivers/firmware
Michael Roth 589959bf46 efi/unaccepted: Fix off-by-one when checking for overlapping ranges
[ Upstream commit 01b1e3ca0e ]

When a task needs to accept memory it will scan the accepting_list
to see if any ranges already being processed by other tasks overlap
with its range. Due to an off-by-one in the range comparisons, a task
might falsely determine that an overlapping range is being accepted,
leading to an unnecessary delay before it begins processing the range.

Fix the off-by-one in the range comparison to prevent this and slightly
improve performance.

Fixes: 50e782a86c ("efi/unaccepted: Fix soft lockups caused by parallel memory acceptance")
Link: https://lore.kernel.org/linux-mm/20231101004523.vseyi5bezgfaht5i@amd.com/T/#me2eceb9906fcae5fe958b3fe88e41f920f8335b6
Reviewed-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Michael Roth <michael.roth@amd.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-08 08:52:23 +01:00
..
arm_ffa firmware: arm_ffa: Allow the FF-A drivers to use 32bit mode of messaging 2023-11-20 11:59:16 +01:00
arm_scmi firmware: arm_scmi: Fixup perf power-cost/microwatt support 2023-09-11 10:34:05 +01:00
broadcom
cirrus firmware: cirrus: cs_dsp: Only log list of algorithms in debug build 2023-09-13 18:50:32 +01:00
efi efi/unaccepted: Fix off-by-one when checking for overlapping ranges 2023-12-08 08:52:23 +01:00
google
imx firmware/imx-dsp: Fix use_after_free in imx_dsp_setup_channels() 2023-10-10 10:30:29 +08:00
meson
psci
smccc
tegra firmware: tegra: Add suspend hook and reset BPMP IPC early on resume 2023-11-20 11:59:16 +01:00
xilinx
arm_scpi.c
arm_sdei.c
dmi_scan.c
dmi-id.c
dmi-sysfs.c
edd.c
iscsi_ibft_find.c
iscsi_ibft.c
Kconfig
Makefile
memmap.c
mtk-adsp-ipc.c
pcdp.c
pcdp.h
qcom_scm-legacy.c
qcom_scm-smc.c
qcom_scm.c firmware: qcom_scm: use 64-bit calling convention only when client is 64-bit 2023-11-28 17:20:03 +00:00
qcom_scm.h
qemu_fw_cfg.c
raspberrypi.c
scpi_pm_domain.c
stratix10-rsu.c
stratix10-svc.c
sysfb_simplefb.c
sysfb.c
ti_sci.c firmware: ti_sci: Mark driver as non removable 2023-11-20 11:59:15 +01:00
ti_sci.h
trusted_foundations.c
turris-mox-rwtm.c