linux-stable/arch/mips
Erick Archer 5b7236c198 MIPS: Alchemy: Use kcalloc() instead of kzalloc()
As noted in the "Deprecated Interfaces, Language Features, Attributes,
and Conventions" documentation [1], size calculations (especially
multiplication) should not be performed in memory allocator (or similar)
function arguments due to the risk of them overflowing. This could lead
to values wrapping around and a smaller allocation being made than the
caller was expecting. Using those allocations could lead to linear
overflows of heap memory and other misbehaviors.

So, use the purpose specific kcalloc() function instead of the argument
size * count in the kzalloc() function.

Link: https://www.kernel.org/doc/html/next/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments [1]
Link: https://github.com/KSPP/linux/issues/162
Signed-off-by: Erick Archer <erick.archer@gmx.com>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2024-02-20 13:36:34 +01:00
..
alchemy MIPS: Alchemy: Use kcalloc() instead of kzalloc() 2024-02-20 13:36:34 +01:00
ath25 MIPS: ath25: Constify static irq_domain_ops 2022-02-22 09:39:03 +01:00
ath79 MIPS: ath79: remove obsolete ATH79_DEV_* configs 2023-03-17 10:28:04 +01:00
bcm47xx MIPS: Fix typos 2024-01-08 10:39:12 +01:00
bcm63xx MIPS: BCM63XX: Fix missing prototypes 2024-01-26 10:33:20 +01:00
bmips MIPS: Explicitly include correct DT includes 2023-07-25 10:42:01 +02:00
boot MIPS: mobileye: Add EPM5 device tree 2024-02-20 12:45:00 +01:00
cavium-octeon Just cleanups and fixes 2024-01-17 11:20:50 -08:00
cobalt MIPS: Cobalt: Fix missing prototypes 2024-01-22 10:32:21 +01:00
configs MIPS: Add support for Mobileye EyeQ5 2024-02-20 13:36:34 +01:00
crypto crypto: mips/crc32 - remove redundant setting of alignmask to 0 2023-10-27 18:04:24 +08:00
dec MIPS: fix typos in comments 2022-05-04 22:22:59 +02:00
fw MIPS: fw arc: Fix missing prototypes 2024-01-22 11:12:01 +01:00
generic MIPS: Share generic kernel code with other architecture 2024-02-20 13:36:25 +01:00
include MIPS: Allows relocation exception vectors everywhere 2024-02-20 12:44:59 +01:00
ingenic
jazz vgacon, arch/*: remove unused screen_info definitions 2023-10-17 10:17:02 +02:00
kernel MIPS: cps-vec: Use macros for 64bits access 2024-02-20 12:44:59 +01:00
kvm MIPS: kvm/entry: Use GPR number macros 2024-02-20 12:41:52 +01:00
lantiq MIPS: lantiq: register smp_ops on non-smp platforms 2024-01-26 10:36:21 +01:00
lib mips: implement xor_unlock_is_negative_byte 2023-10-18 14:34:17 -07:00
loongson2ef MIPS: Fix typos 2024-01-08 10:39:12 +01:00
loongson32 MIPS: loongson32: Remove dma.h and nand.h 2023-10-06 10:10:13 +02:00
loongson64 MIPS: loongson64: set nid for reserved memblock region 2024-01-27 11:07:57 +01:00
math-emu MIPS: Fix comment typo 2022-09-12 15:33:24 +02:00
mm MIPS: tlbex: Use GPR number macros 2024-02-20 12:41:52 +01:00
mobileye MIPS: Add support for Mobileye EyeQ5 2024-02-20 13:36:34 +01:00
mti-malta vgacon: clean up global screen_info instances 2023-10-17 10:17:02 +02:00
n64
net MIPS: Fix typos 2024-01-08 10:39:12 +01:00
pci Just cleanups and fixes 2024-01-17 11:20:50 -08:00
pic32 MIPS: Fixup explicit DT include clean-up 2023-07-28 11:41:09 +02:00
power mips: suspend: include linux/suspend.h as needed 2023-12-10 17:21:41 -08:00
ralink MIPS: Fix typos 2024-01-08 10:39:12 +01:00
rb532 MIPS: rb532: move GPIOD definition into C-files 2022-03-30 20:26:26 +02:00
sgi-ip22 driver core: make struct bus_type.uevent() take a const * 2023-01-27 13:45:52 +01:00
sgi-ip27 MIPS: sgi-ip27: Fix missing prototypes 2024-01-22 11:11:49 +01:00
sgi-ip30 MIPS: sgi-ip30: Fix missing prototypes 2024-01-22 11:12:08 +01:00
sgi-ip32 MIPS: sgi-ip32: Fix missing prototypes 2024-01-22 11:12:19 +01:00
sibyte vgacon: fix mips/sibyte build regression 2023-10-24 08:54:37 +02:00
sni vgacon: clean up global screen_info instances 2023-10-17 10:17:02 +02:00
tools MIPS: fix typos in comments 2022-05-04 22:22:59 +02:00
txx9 MIPS: Fix typos 2024-01-08 10:39:12 +01:00
vdso arch: vdso: consolidate gettime prototypes 2023-11-23 11:32:32 +01:00
Kbuild MIPS: Share generic kernel code with other architecture 2024-02-20 13:36:25 +01:00
Kbuild.platforms MIPS: Add support for Mobileye EyeQ5 2024-02-20 13:36:34 +01:00
Kconfig MIPS: Add support for Mobileye EyeQ5 2024-02-20 13:36:34 +01:00
Kconfig.debug
Makefile Revert MIPS: Loongson: Fix build error when make modules_install 2023-07-25 10:42:01 +02:00
Makefile.postlink kbuild: remove ARCH_POSTLINK from module builds 2023-10-28 21:10:08 +09:00