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

From: Sergey Ryazanov
Date: Tue Jun 04 2024 - 15:38:46 EST


On 04.06.2024 11:25, 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>

Nice catch!

Acked-by: Sergey Ryazanov <ryazanov.s.a@xxxxxxxxx>