linux-stable/arch/sh
John Paul Adrian Glaubitz d96f6bc107 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:00:33 +09:00
..
boards SH: Bulk conversion to generic_handle_domain_irq() 2021-08-12 11:39:40 +01:00
boot sh: Add missing FORCE prerequisites in Makefile 2021-09-19 10:13:42 +09:00
cchips treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
configs Documentation, arch: Remove leftovers from CIFS_WEAK_PW_HASH 2022-01-27 11:05:21 +01:00
drivers sh: dma: fix kconfig dependency for G2_DMA 2021-01-06 19:55:22 -05:00
include sh: sanitize the flags on sigreturn 2023-03-30 12:47:54 +02:00
kernel sh: sq: Fix incorrect element size for allocating bitmap buffer 2023-05-11 23:00:33 +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: math-emu: drop unused functions 2021-11-25 09:48:31 +01:00
mm mm/memory_hotplug: remove nid parameter from arch_remove_memory() 2021-09-08 11:50:23 -07:00
tools sh: Remove SH5-based Cayman platform 2020-08-14 22:05:06 -04:00
Kbuild sh: move core-y in arch/sh/Makefile to arch/sh/Kbuild 2021-05-26 23:11:47 +09:00
Kconfig Tracing updates for 5.15: 2021-09-05 11:50:41 -07: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-11-25 09:48:31 +01:00
Makefile sh: move core-y in arch/sh/Makefile to arch/sh/Kbuild 2021-05-26 23:11:47 +09:00