From: Zhang Qilong <zhangqilong3@huawei.com>
To: <rjw@rjwysocki.net>, <fugang.duan@nxp.com>, <davem@davemloft.net>,
<kuba@kernel.org>
Cc: <linux-pm@vger.kernel.org>, <netdev@vger.kernel.org>
Subject: [PATCH 0/2] Fix usage counter leak by adding a general sync ops
Date: Mon, 9 Nov 2020 16:09:36 +0800 [thread overview]
Message-ID: <20201109080938.4174745-1-zhangqilong3@huawei.com> (raw)
Many caller forget to decrease the usage counter when call
pm_runtime_get_sync. This problem has been discussed in detail,
[0][1] and we add gene_pm_runtime_get_sync ops to deal with usage
counter for better coding. Then, we replace pm_runtime_get_sync
with it in fec_main.c
[0]https://lkml.org/lkml/2020/6/14/88
[1]https://patchwork.ozlabs.org/project/linux-tegra/patch/20200520095148.10995-1-dinghao.liu@zju.edu.cn/
Zhang Qilong (2):
PM: runtime: Add a general runtime get sync operation to deal with
usage counter
net: fec: Fix reference count leak in fec series ops
drivers/net/ethernet/freescale/fec_main.c | 10 +++----
include/linux/pm_runtime.h | 32 +++++++++++++++++++++++
2 files changed, 37 insertions(+), 5 deletions(-)
--
2.25.4
next reply other threads:[~2020-11-09 8:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-09 8:09 Zhang Qilong [this message]
2020-11-09 8:09 ` [PATCH 1/2] PM: runtime: Add a general runtime get sync operation to deal with usage counter Zhang Qilong
2020-11-09 12:59 ` Rafael J. Wysocki
2020-11-09 13:24 ` 答复: " zhangqilong
2020-11-09 13:28 ` Rafael J. Wysocki
2020-11-09 13:45 ` 答复: " zhangqilong
2020-11-09 14:07 ` Rafael J. Wysocki
2020-11-09 14:19 ` 答复: " zhangqilong
2020-11-09 8:09 ` [PATCH 2/2] net: fec: Fix reference count leak in fec series ops Zhang Qilong
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=20201109080938.4174745-1-zhangqilong3@huawei.com \
--to=zhangqilong3@huawei.com \
--cc=davem@davemloft.net \
--cc=fugang.duan@nxp.com \
--cc=kuba@kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/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).