mbox series

[0/2] Fix usage counter leak by adding a general sync ops

Message ID 20201109080938.4174745-1-zhangqilong3@huawei.com
Headers show
Series Fix usage counter leak by adding a general sync ops | expand

Message

Zhang Qilong Nov. 9, 2020, 8:09 a.m. UTC
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(-)