From: Jakub Kicinski <kuba@kernel.org>
To: Wei Yongjun <weiyongjun@huaweicloud.com>
Cc: Loic Poulain <loic.poulain@linaro.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Wei Yongjun <weiyongjun1@huawei.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH net] net: mhi: Fix memory leak in mhi_net_dellink()
Date: Thu, 10 Nov 2022 16:25:32 -0800 [thread overview]
Message-ID: <20221110162532.02dd4715@kernel.org> (raw)
In-Reply-To: <20221109100915.3669279-1-weiyongjun@huaweicloud.com>
On Wed, 9 Nov 2022 10:09:15 +0000 Wei Yongjun wrote:
> MHI driver registers network device without setting the
> needs_free_netdev flag, and does NOT call free_netdev() when
> unregisters network device, which causes a memory leak.
>
> This patch calls free_netdev() to fix it since netdev_priv
> is used after unregister.
>
> Fixes: 7ffa7542eca6 ("net: mhi: Remove MBIM protocol")
I don't see how the bug is introduced by this commit.
Please find the correct fixes tag or add an explanation of how the bug
got added.
prev parent reply other threads:[~2022-11-11 0:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-09 10:09 [PATCH net] net: mhi: Fix memory leak in mhi_net_dellink() Wei Yongjun
2022-11-11 0:25 ` 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=20221110162532.02dd4715@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=loic.poulain@linaro.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=weiyongjun1@huawei.com \
--cc=weiyongjun@huaweicloud.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).