mirror-linux/arch/sh/kernel/cpu
John Paul Adrian Glaubitz 6a1cfc3036 sh: sq: Fix incorrect element size for allocating bitmap buffer
[ Upstream commit 80f746e2bd ]

The Store Queue code allocates a bitmap buffer with the size of
multiple of sizeof(long) in sq_api_init(). While the buffer size
is calculated correctly, the code uses the wrong element size to
allocate the buffer which results in the allocated bitmap buffer
being too small.

Fix this by allocating the buffer with kcalloc() with element size
sizeof(long) instead of kzalloc() whose elements size defaults to
sizeof(char).

Fixes: d7c30c682a ("sh: Store Queue API rework.")
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Link: https://lore.kernel.org/r/20230419114854.528677-1-glaubitz@physik.fu-berlin.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-11 23:03:30 +09:00
..
irq sh: remove sh5 support 2020-06-01 14:48:52 -04:00
sh2 remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
sh2a sh: add the sh_ prefix to early platform symbols 2019-10-07 13:50:48 +02:00
sh3 arch: sh: remove duplicate include 2021-01-06 19:55:27 -05:00
sh4 sh: sq: Fix incorrect element size for allocating bitmap buffer 2023-05-11 23:03:30 +09:00
sh4a sh: check return code of request_irq 2021-09-17 13:59:59 -04:00
shmobile cpuidle: Drop disabled field from struct cpuidle_state 2019-11-29 11:48:39 +01:00
Makefile sh: remove sh5 support 2020-06-01 14:48:52 -04:00
adc.c
clock-cpg.c
clock.c sh: cpu: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
fpu.c signal/sh: Use force_sig(SIGKILL) instead of do_group_exit(SIGKILL) 2021-10-25 15:56:29 -05:00
init.c sh: remove sh5 support 2020-06-01 14:48:52 -04:00
pfc.c sh: cpu: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
proc.c sh: remove sh5 support 2020-06-01 14:48:52 -04:00