mirror-linux/arch/sh/kernel/cpu/sh4
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
..
Makefile
clock-sh4-202.c sh: sh4: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
clock-sh4.c sh: sh4: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
fpu.c signal: Remove task parameter from force_sig 2019-05-27 09:36:28 -05:00
perf_event.c sh: sh4: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
probe.c sh: sh4: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
setup-sh4-202.c sh: add the sh_ prefix to early platform symbols 2019-10-07 13:50:48 +02:00
setup-sh7750.c sh: add the sh_ prefix to early platform symbols 2019-10-07 13:50:48 +02:00
setup-sh7760.c sh: add the sh_ prefix to early platform symbols 2019-10-07 13:50:48 +02:00
softfloat.c
sq.c sh: sq: Fix incorrect element size for allocating bitmap buffer 2023-05-11 23:03:30 +09:00