[PATCH] ARM: sun9i: smp: fix out-of-bounds access error

Florian Fainelli f.fainelli at gmail.com
Mon Oct 3 15:10:12 PDT 2022


On 9/28/22 18:29, William Zhang wrote:
> When running multi_v7_defconfig with CONFIG_UBSAN enabled, kernel
> reports UBSAN array-index-out-of-bounds error in sunxi_mc_smp_init
> function on non-sunxi platform.
> 
> Checking index to the sunxi_mc_smp_data array for out-of-bounds
> condition is needed to cover non-sunxi platform. Also fix the handling
> of return value from of_property_match_string function. Only negitive
> value is an error condition and should bail out from the function.
> 
> Fixes: 1631090e34f5 ("ARM: sun9i: smp: Add is_a83t field")
> 
> Signed-off-by: William Zhang <william.zhang at broadcom.com>

FWIW:

Reviewed-by: Florian Fainelli <f.fainelli at gmail.com>
-- 
Florian



More information about the linux-arm-kernel mailing list