linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: "José Expósito" <jose.exposito89@gmail.com>
Cc: Vladimir Oltean <vladimir.oltean@nxp.com>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	"alexandre.belloni@bootlin.com" <alexandre.belloni@bootlin.com>,
	"andrew@lunn.ch" <andrew@lunn.ch>,
	"vivien.didelot@gmail.com" <vivien.didelot@gmail.com>,
	"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net: dsa: felix: Fix memory leak in felix_setup_mmio_filtering
Date: Wed, 8 Dec 2021 15:10:30 -0800	[thread overview]
Message-ID: <20211208151030.1b489fad@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <20211208181331.ptgtxg77yiz2zgb5@skbuf>

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.

  reply	other threads:[~2021-12-08 23:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-08 18:05 [PATCH] net: dsa: felix: Fix memory leak in felix_setup_mmio_filtering José Expósito
2021-12-08 18:13 ` Vladimir Oltean
2021-12-08 23:10   ` Jakub Kicinski [this message]
2021-12-09 11:09     ` José Expósito

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211208151030.1b489fad@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
    --to=kuba@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=jose.exposito89@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@gmail.com \
    --cc=vladimir.oltean@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).