Re: [PATCH net] net: wwan: iosm: Fix tainted pointer delete is case of region creation fail

From: Simon Horman
Date: Wed Jun 05 2024 - 14:59:19 EST


On Tue, Jun 04, 2024 at 11:25:00AM +0300, Aleksandr Mishin wrote:
> In case of region creation fail in ipc_devlink_create_region(), previously
> created regions delete process starts from tainted pointer which actually
> holds error code value.
> Fix this bug by decreasing region index before delete.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: 4dcd183fbd67 ("net: wwan: iosm: devlink registration")
> Signed-off-by: Aleksandr Mishin <amishin@xxxxxxxxxx>

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>