OpenCloudOS-Kernel/drivers/firmware
Arnd Bergmann 72f8da75b8 efi/capsule-loader: fix incorrect allocation size
[ Upstream commit fccfa646ef3628097d59f7d9c1a3e84d4b6bb45e ]

gcc-14 notices that the allocation with sizeof(void) on 32-bit architectures
is not enough for a 64-bit phys_addr_t:

drivers/firmware/efi/capsule-loader.c: In function 'efi_capsule_open':
drivers/firmware/efi/capsule-loader.c:295:24: error: allocation of insufficient size '4' for type 'phys_addr_t' {aka 'long long unsigned int'} with size '8' [-Werror=alloc-size]
  295 |         cap_info->phys = kzalloc(sizeof(void *), GFP_KERNEL);
      |                        ^

Use the correct type instead here.

Fixes: f24c4d4780 ("efi/capsule-loader: Reinstate virtual capsule mapping")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 950d4d74d311a18baed6878dbfba8180d7e5dddd)
Signed-off-by: Alex Shi (tencent) <alexs@kernel.org>
Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
2024-11-28 21:43:49 +08:00
..
arm_scmi tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
broadcom firmware: bcm47xx_nvram: _really_ correct size_t printf format 2019-09-22 11:31:15 -07:00
efi efi/capsule-loader: fix incorrect allocation size 2024-11-28 21:43:49 +08:00
google tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
imx ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
meson treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 446 2019-06-05 17:37:18 +02:00
psci tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
tegra tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
xilinx firmware: xilinx: Add fpga API's 2019-04-15 10:22:51 +02:00
Kconfig ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
Makefile Char/Misc driver patches for 5.4-rc1 2019-09-18 11:14:31 -07:00
arm_scpi.c tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
arm_sdei.c sdei_watchdog: set secure timer period base on 'watchdog_thresh' 2024-11-05 18:57:53 +08:00
dmi-id.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 191 2019-05-30 11:29:21 -07:00
dmi-sysfs.c tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
dmi_scan.c tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
edd.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 287 2019-06-05 17:36:37 +02:00
iscsi_ibft.c Merge branch 'for-linus-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/ibft 2019-07-26 09:43:43 -07:00
iscsi_ibft_find.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 287 2019-06-05 17:36:37 +02:00
memmap.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 287 2019-06-05 17:36:37 +02:00
pcdp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pcdp.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
qcom_scm-32.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 267 2019-06-05 17:30:29 +02:00
qcom_scm-64.c tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00
qcom_scm.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
qcom_scm.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284 2019-06-05 17:36:37 +02:00
qemu_fw_cfg.c tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
raspberrypi.c firmware: raspberrypi: register clk device 2019-06-25 16:04:26 -07:00
scpi_pm_domain.c tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
stratix10-rsu.c firmware: add Intel Stratix10 remote system update driver 2019-09-04 13:31:28 +02:00
stratix10-svc.c tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
ti_sci.c firmware: ti_sci: Allow for device shared and exclusive requests 2019-09-04 20:44:33 +02:00
ti_sci.h ARM: SoC-related driver updates 2019-07-19 17:13:56 -07:00
trusted_foundations.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
turris-mox-rwtm.c tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00