Subject: Re: [PATCH net v3] fsl/fman: Validate cell-index value obtained from Device Tree

From: Jakub Kicinski <[email-masked]>
Date: Wed, 4 Sep 2024 07:23:07 -0700

On Wed, 4 Sep 2024 09:09:20 +0300 Aleksandr Mishin wrote:
> Cell-index value is obtained from Device Tree and then used to calculate
> the index for accessing arrays port_mfl[], mac_mfl[] and intr_mng[].
> In case of broken DT due to any error cell-index can contain any value
> and it is possible to go beyond the array boundaries which can lead
> at least to memory corruption.
> 
> Validate cell-index value obtained from Device Tree.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.

coccicheck complains of_dev is not released, we should fix that first,
before we add more returns here.
-- 
pw-bot: cr