linux-stable/arch/sh
John Paul Adrian Glaubitz 82699c827f 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:11:23 +09:00
..
boards mmc: sh_mmcif: move platform_data header to proper location 2022-04-26 14:05:21 +02:00
boot mmc: sh_mmcif: move platform_data header to proper location 2022-04-26 14:05:21 +02:00
cchips treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
configs USB/Thunderbolt driver changes for 6.2-rc1 2022-12-16 03:22:53 -08:00
drivers treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
include sh: sanitize the flags on sigreturn 2023-03-30 12:51:31 +02:00
kernel sh: sq: Fix incorrect element size for allocating bitmap buffer 2023-05-11 23:11:23 +09:00
lib sh: propage the calling conventions change down to csum_partial_copy_generic() 2020-08-20 15:45:18 -04:00
math-emu sh: fix READ/WRITE redefinition warnings 2021-10-27 16:51:32 -04:00
mm arch: mm: rename FORCE_MAX_ZONEORDER to ARCH_FORCE_MAX_ORDER 2022-09-11 20:25:56 -07:00
tools sh: Remove SH5-based Cayman platform 2020-08-14 22:05:06 -04:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig mm: Rename GUP_GET_PTE_LOW_HIGH 2022-12-15 10:37:27 -08:00
Kconfig.cpu docs: sh: convert register-banks.txt to ReST 2020-06-19 14:10:13 -06:00
Kconfig.debug sh: fix kconfig unmet dependency warning for FRAME_POINTER 2021-10-27 16:51:01 -04:00
Makefile kbuild: remove head-y syntax 2022-10-02 18:06:03 +09:00