aboutsummaryrefslogtreecommitdiff
path: root/lib/test-string_helpers.c
diff options
context:
space:
mode:
authorJohn Paul Adrian Glaubitz <[email protected]>2023-04-19 13:48:52 +0200
committerJohn Paul Adrian Glaubitz <[email protected]>2023-04-19 15:55:30 +0200
commit80f746e2bd0e1da3fdb49a53570e54a1a225faac (patch)
tree844e575d084e0c2f7e850cbc7e7075fb19ab2c43 /lib/test-string_helpers.c
parent63f148c44f3919047301a023b10b0e3ce65a7389 (diff)
sh: sq: Fix incorrect element size for allocating bitmap buffer
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: d7c30c682a27 ("sh: Store Queue API rework.") Reviewed-by: Geert Uytterhoeven <[email protected]> Signed-off-by: John Paul Adrian Glaubitz <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib/test-string_helpers.c')
0 files changed, 0 insertions, 0 deletions