linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jose Abreu <Jose.Abreu@synopsys.com>
To: Christian Marangi <ansuelsmth@gmail.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-stm32@st-md-mailman.stormreply.com" 
	<linux-stm32@st-md-mailman.stormreply.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Jose Abreu <Jose.Abreu@synopsys.com>
Subject: RE: [net-next PATCH v5 4/5] net: ethernet: stmicro: stmmac: generate stmmac dma conf before open
Date: Wed, 14 Jun 2023 13:48:40 +0000	[thread overview]
Message-ID: <DM4PR12MB508899B25BA18E2E53939BE7D35AA@DM4PR12MB5088.namprd12.prod.outlook.com> (raw)
In-Reply-To: <64898745.5d0a0220.546a.a6f1@mx.google.com>

From: Christian Marangi <ansuelsmth@gmail.com>
Date: Wed, Jun 14, 2023 at 03:16:08

> I'm not following the meaning of leak here. If it's intended as a memory
> leak then dma_conf is correctly freed in the 2 user of __stmmac_open.
> 
> stmmac_init_phy also doesn't seems to use dma_conf. Am I missing
> something here?
> 

Sorry, I should have been clearer: It's not leaking the dma_conf per-se but
the contents of it: The DMA descriptors. Since the memcpy() is only done after
init_phy(); if init_phy() fails, then stmmac will never free up the DMA descriptors.

Does it make sense?

Thanks,
Jose

  reply	other threads:[~2023-06-14 13:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-23 14:29 [net-next PATCH v5 0/5] *Add MTU change with stmmac interface running Christian Marangi
2022-07-23 14:29 ` [net-next PATCH v5 1/5] net: ethernet: stmicro: stmmac: move queue reset to dedicated functions Christian Marangi
2022-07-23 14:29 ` [net-next PATCH v5 2/5] net: ethernet: stmicro: stmmac: first disable all queues and disconnect in release Christian Marangi
2022-07-23 14:29 ` [net-next PATCH v5 3/5] net: ethernet: stmicro: stmmac: move dma conf to dedicated struct Christian Marangi
2022-07-23 14:29 ` [net-next PATCH v5 4/5] net: ethernet: stmicro: stmmac: generate stmmac dma conf before open Christian Marangi
2023-06-14  7:15   ` Jose Abreu
2023-06-14  2:16     ` Christian Marangi
2023-06-14 13:48       ` Jose Abreu [this message]
2023-06-14  7:35         ` Christian Marangi
2022-07-23 14:29 ` [net-next PATCH v5 5/5] net: ethernet: stmicro: stmmac: permit MTU change with interface up Christian Marangi
2022-07-26  2:50 ` [net-next PATCH v5 0/5] *Add MTU change with stmmac interface running patchwork-bot+netdevbpf

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=DM4PR12MB508899B25BA18E2E53939BE7D35AA@DM4PR12MB5088.namprd12.prod.outlook.com \
    --to=jose.abreu@synopsys.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=ansuelsmth@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux@armlinux.org.uk \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=peppe.cavallaro@st.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).