linux-stable/arch/sh
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
..
boards
boot
cchips
configs - hfs and hfsplus kmap API modernization from Fabio Francesco 2022-10-12 11:00:22 -07:00
drivers
include sh: sanitize the flags on sigreturn 2023-03-30 12:49:19 +02:00
kernel sh: sq: Fix incorrect element size for allocating bitmap buffer 2023-05-11 23:03:30 +09:00
lib
math-emu
mm arch: mm: rename FORCE_MAX_ZONEORDER to ARCH_FORCE_MAX_ORDER 2022-09-11 20:25:56 -07:00
tools
Kbuild
Kconfig mm/mmap: drop ARCH_HAS_VM_GET_PAGE_PROT 2022-07-17 17:14:41 -07:00
Kconfig.cpu
Kconfig.debug
Makefile kbuild: remove head-y syntax 2022-10-02 18:06:03 +09:00