[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250618194301.GA1699@horms.kernel.org>
Date: Wed, 18 Jun 2025 20:43:01 +0100
From: Simon Horman <horms@...nel.org>
To: Subbaraya Sundeep <sbhatta@...vell.com>
Cc: andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, sgoutham@...vell.com,
lcherian@...vell.com, gakula@...vell.com, jerinj@...vell.com,
hkelam@...vell.com, saikrishnag@...vell.com, netdev@...r.kernel.org
Subject: Re: [net-next PATCH] octeontx2-af: Fix rvu_mbox_init return path
On Wed, Jun 18, 2025 at 07:27:16PM +0530, Subbaraya Sundeep wrote:
> rvu_mbox_init function makes use of error path for
> freeing memory which are local to the function in
> both success and failure conditions. This is unusual hence
> fix it by returning zero on success. With new cn20k code this
> is freeing valid memory in success case also.
>
> Fixes: e53ee4acb220 ("octeontx2-af: CN20k basic mbox operations and structures")
> Signed-off-by: Subbaraya Sundeep <sbhatta@...vell.com>
Reviewed-by: Simon Horman <horms@...nel.org>
Although I don't think the problem is introduced by this patch
with it applied Smatch notices that the following code, around line 2528,
which jumps to free_regions does so with err uninitialised. This is a
problem because the jump will result in the function returning err.
switch (type) {
case TYPE_AFPF
...
default:
goto free_regions;
}
...
Powered by blists - more mailing lists