All of lore.kernel.org
 help / color / mirror / Atom feed
From: "José Expósito" <jose.exposito89@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
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: Thu, 9 Dec 2021 12:09:18 +0100	[thread overview]
Message-ID: <20211209110918.GA11977@elementary> (raw)
In-Reply-To: <20211208151030.1b489fad@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>

On Wed, Dec 08, 2021 at 03:10:30PM -0800, Jakub Kicinski wrote:
> On Wed, 8 Dec 2021 18:13:32 +0000 Vladimir Oltean wrote:
> > 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.

Thanks for the quick review. I just sent v2 in case you decide to keep
the cpu check:

https://lore.kernel.org/netdev/20211209110538.11585-1-jose.exposito89@gmail.com/T/#u

Jose

      reply	other threads:[~2021-12-09 11:09 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
2021-12-09 11:09     ` José Expósito [this message]

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=20211209110918.GA11977@elementary \
    --to=jose.exposito89@gmail.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.