linux/drivers/hwspinlock
Gustavo A. R. Silva 9a41358972 hwspinlock: sprd: Use struct_size() helper in devm_kzalloc()
Make use of the struct_size() helper instead of an open-coded version,
in order to avoid any potential type mistakes or integer overflows that,
in the worst scenario, could lead to heap overflows.

Also, address the following sparse warnings:
drivers/hwspinlock/sprd_hwspinlock.c:96:36: warning: using sizeof on a flexible structure

Link: https://github.com/KSPP/linux/issues/174
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Baolin Wang <baolin.wang7@gmail.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220125225723.GA78256@embeddedor
2022-03-11 14:56:57 -06:00
..
hwspinlock_core.c hwspinlock: Let the PM runtime can be optional 2019-11-08 16:42:00 -08:00
hwspinlock_internal.h hwspinlock: hwspinlock_internal.h: Replace zero-length array with flexible-array member 2020-03-25 22:30:46 -07:00
Kconfig hwspinlock: add sun6i hardware spinlock support 2021-05-27 22:19:42 -05:00
Makefile hwspinlock: add sun6i hardware spinlock support 2021-05-27 22:19:42 -05:00
omap_hwspinlock.c hwspinlock: omap: Add support for K3 AM64x SoCs 2021-02-09 11:36:50 -06:00
qcom_hwspinlock.c hwspinlock: qcom: Allow mmio usage in addition to syscon 2020-07-13 22:29:28 -07:00
sprd_hwspinlock.c hwspinlock: sprd: Use struct_size() helper in devm_kzalloc() 2022-03-11 14:56:57 -06:00
stm32_hwspinlock.c hwspinlock: stm32: Use struct_size() helper in devm_kzalloc() 2022-03-11 14:56:15 -06:00
sun6i_hwspinlock.c hwspinlock: add sun6i hardware spinlock support 2021-05-27 22:19:42 -05:00
u8500_hsem.c hwspinlock: u8500_hsem: Remove redundant PM runtime implementation 2019-11-08 16:42:26 -08:00