From: Andrew Lunn <andrew@lunn•ch>
To: Miaoqian Lin <linmq006@gmail•com>
Cc: kuba@kernel•org, davem@davemloft•net,
linux-kernel@vger•kernel.org, lipeng321@huawei•com,
liuyonglong@huawei•com, mbrugger@suse•com,
netdev@vger•kernel.org, salil.mehta@huawei•com,
shenyang39@huawei•com, yisen.zhuang@huawei•com
Subject: Re: [PATCH v2] net: hns: Fix missing put_device() call in hns_mac_register_phy
Date: Wed, 12 Jan 2022 14:46:05 +0100 [thread overview]
Message-ID: <Yd7bnS/jPQgRPD88@lunn.ch> (raw)
In-Reply-To: <20220112103919.28894-1-linmq006@gmail.com>
On Wed, Jan 12, 2022 at 10:39:19AM +0000, Miaoqian Lin wrote:
> We need to drop the reference taken by hns_dsaf_find_platform_device
> Missing put_device() may cause refcount leak.
Is the put also missing on driver unload?
As a fix for net, it might be better to rename
dsaf_find_platform_device() to dsaf_get_platform_device() and add a
dsaf_put_platform_device(). Add similar undo functions where ever
needed, and make sure they get called.
Andrew
prev parent reply other threads:[~2022-01-12 13:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-10 6:40 [PATCH] net: hns: Fix missing put_device() call in hns_mac_register_phy Miaoqian Lin
2022-01-12 4:33 ` Jakub Kicinski
2022-01-12 10:39 ` [PATCH v2] " Miaoqian Lin
2022-01-12 13:46 ` Andrew Lunn [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=Yd7bnS/jPQgRPD88@lunn.ch \
--to=andrew@lunn$(echo .)ch \
--cc=davem@davemloft$(echo .)net \
--cc=kuba@kernel$(echo .)org \
--cc=linmq006@gmail$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=lipeng321@huawei$(echo .)com \
--cc=liuyonglong@huawei$(echo .)com \
--cc=mbrugger@suse$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=salil.mehta@huawei$(echo .)com \
--cc=shenyang39@huawei$(echo .)com \
--cc=yisen.zhuang@huawei$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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