lkml.org 
[lkml]   [2021]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] net: dsa: felix: Fix memory leak in felix_setup_mmio_filtering
On Wed, 8 Dec 2021 18:13:32 +0000 Vladimir Oltean wrote:
> On Wed, Dec 08, 2021 at 07:05:09PM +0100, José Expósito wrote:
> > Addresses-Coverity-ID: 1492897 ("Resource leak")
> > Addresses-Coverity-ID: 1492899 ("Resource leak")
> > Signed-off-by: José Expósito <jose.exposito89@gmail.com>
> > ---
>
> Impossible memory leak, I might add, because DSA will error out much
> soon if there isn't any CPU port defined:
> https://elixir.bootlin.com/linux/v5.15.7/source/net/dsa/dsa2.c#L374
> I don't think I should have added the "if (cpu < 0)" check at all, but
> then it would have raised other flags, about BIT(negative number) or
> things like that. I don't know what's the best way to deal with this?
>
> Anyway, in case we find no better alternative:
>
> Fixes: 8d5f7954b7c8 ("net: dsa: felix: break at first CPU port during init and teardown")
> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>

If this is the way to go please repost with the tags added
and a commit message.

\
 
 \ /
  Last update: 2021-12-09 00:11    [W:0.019 / U:1.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site