From: Christian Marangi <ansuelsmth@gmail.com>
To: Jose Abreu <Jose.Abreu@synopsys.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>
Subject: Re: [net-next PATCH v5 4/5] net: ethernet: stmicro: stmmac: generate stmmac dma conf before open
Date: Wed, 14 Jun 2023 09:35:02 +0200 [thread overview]
Message-ID: <6489cc44.5d0a0220.47312.6e31@mx.google.com> (raw)
In-Reply-To: <DM4PR12MB508899B25BA18E2E53939BE7D35AA@DM4PR12MB5088.namprd12.prod.outlook.com>
On Wed, Jun 14, 2023 at 01:48:40PM +0000, Jose Abreu wrote:
> 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 for the clarification! Sent a follow-up patch that should fix the
possible leak. Would be good if you can also test it for a Tested-by
tag.
--
Ansuel
next prev parent reply other threads:[~2023-06-14 14:18 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
2023-06-14 7:35 ` Christian Marangi [this message]
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=6489cc44.5d0a0220.47312.6e31@mx.google.com \
--to=ansuelsmth@gmail.com \
--cc=Jose.Abreu@synopsys.com \
--cc=alexandre.torgue@foss.st.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).