netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Fix usage counter leak by adding a general sync ops
@ 2020-11-09 15:04 Zhang Qilong
  2020-11-09 15:04 ` [PATCH v2 1/2] PM: runtime: Add a general runtime get sync operation to deal with usage counter Zhang Qilong
  2020-11-09 15:04 ` [PATCH v2 2/2] net: fec: Fix reference count leak in fec series ops Zhang Qilong
  0 siblings, 2 replies; 11+ messages in thread
From: Zhang Qilong @ 2020-11-09 15:04 UTC (permalink / raw)
  To: rjw, fugang.duan, davem, kuba; +Cc: linux-pm, netdev

In many case, we need to check return value of pm_runtime_get_sync,
but it brings a trouble to the usage counter processing. Many callers
forget to decrease the usage counter when it failed. It has been
discussed a lot[0][1]. So we add a function to deal with the usage
counter for better coding and view. Then, we replace pm_runtime_get_sync
with it in fec_main.c

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 | 12 ++++-----
 include/linux/pm_runtime.h                | 30 +++++++++++++++++++++++
 2 files changed, 35 insertions(+), 7 deletions(-)

-- 
2.25.4


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-11-09 16:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-09 15:04 [PATCH v2 0/2] Fix usage counter leak by adding a general sync ops Zhang Qilong
2020-11-09 15:04 ` [PATCH v2 1/2] PM: runtime: Add a general runtime get sync operation to deal with usage counter Zhang Qilong
2020-11-09 15:20   ` Rafael J. Wysocki
2020-11-09 15:49     ` Ulf Hansson
2020-11-09 15:53       ` Rafael J. Wysocki
2020-11-09 16:05         ` Ulf Hansson
2020-11-09 15:50     ` 答复: " zhangqilong
2020-11-09 16:00       ` Rafael J. Wysocki
2020-11-09 16:15         ` 答复: " zhangqilong
2020-11-09 16:40           ` Rafael J. Wysocki
2020-11-09 15:04 ` [PATCH v2 2/2] net: fec: Fix reference count leak in fec series ops Zhang Qilong

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).