From: Jakub Kicinski <kuba@kernel.org>
To: Yan Cangang <nalanzeyu@gmail.com>
Cc: leon@kernel.org, Mark-MC.Lee@mediatek.com, john@phrozen.org,
nbd@nbd.name, netdev@vger.kernel.org, sean.wang@mediatek.com
Subject: Re: [PATCH v2] net: ethernet: mtk_eth_soc: fix memory leak in error path
Date: Thu, 17 Nov 2022 21:13:15 -0800 [thread overview]
Message-ID: <20221117211315.1402a27c@kernel.org> (raw)
In-Reply-To: <20221116051407.1679342-1-nalanzeyu@gmail.com>
On Wed, 16 Nov 2022 13:14:07 +0800 Yan Cangang wrote:
> In mtk_ppe_init(), when dmam_alloc_coherent() or devm_kzalloc() failed,
> the rhashtable ppe->l2_flows isn't destroyed. Fix it.
>
> In mtk_probe(), when mtk_eth_offload_init() or register_netdev() failed,
> have the same problem. Also, call to mtk_mdio_cleanup() is missed in this
> case. Fix it.
>
> Fixes: 33fc42de3327 ("net: ethernet: mtk_eth_soc: support creating mac address based offload entries")
> Fixes: ba37b7caf1ed ("net: ethernet: mtk_eth_soc: add support for initializing the PPE")
> Fixes: 502e84e2382d ("net: ethernet: mtk_eth_soc: add flow offloading support")
> Signed-off-by: Yan Cangang <nalanzeyu@gmail.com>
Please break this fix up into a series of two patches, first one fixing
the issue in ba37b7caf1ed and 502e84e2382d, and second one fixing the
issue in 33fc42de3327. Those are separate fixes, and should be
backported differently (the former is needed in LTS).
Please repost with the subject changed as Leon suggested and do not
repost in this thread, start a new thread.
prev parent reply other threads:[~2022-11-18 5:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-12 23:32 [PATCH] net: ethernet: mtk_eth_soc: fix memory leak in mtk_ppe_init() Yan Cangang
2022-11-14 7:59 ` Leon Romanovsky
2022-11-16 5:14 ` [PATCH v2] net: ethernet: mtk_eth_soc: fix memory leak in error path Yan Cangang
2022-11-17 9:50 ` Leon Romanovsky
2022-11-18 5:13 ` Jakub Kicinski [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=20221117211315.1402a27c@kernel.org \
--to=kuba@kernel.org \
--cc=Mark-MC.Lee@mediatek.com \
--cc=john@phrozen.org \
--cc=leon@kernel.org \
--cc=nalanzeyu@gmail.com \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=sean.wang@mediatek.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).