linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] drm/rockchip: fix reference leak of pm_runtime_get_sync
@ 2020-11-30 13:44 Qinglang Miao
  2020-11-30 13:44 ` [PATCH 1/3] drm/rockchip: cdn-dp: fix reference leak when pm_runtime_get_sync fails Qinglang Miao
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Qinglang Miao @ 2020-11-30 13:44 UTC (permalink / raw)
  To: Sandy Huang, Heiko Stübner, David Airlie, Daniel Vetter
  Cc: dri-devel, linux-arm-kernel, linux-rockchip, linux-kernel, Qinglang Miao

Replace pm_runtime_get_sync with pm_runtime_resume_and_get to keep usage
counter balanced. 

Qinglang Miao (3):
  drm/rockchip: cdn-dp: fix reference leak when pm_runtime_get_sync
    fails
  drm/rockchip: vop: fix reference leak when pm_runtime_get_sync fails
  drm/rockchip: lvds: fix reference leak when pm_runtime_get_sync fails

 drivers/gpu/drm/rockchip/cdn-dp-core.c      | 2 +-
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 ++--
 drivers/gpu/drm/rockchip/rockchip_lvds.c    | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

-- 
2.23.0


^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH 0/3] drm/rockchip: fix reference leak when pm_runtime_get_sync fails
@ 2020-12-01 12:54 Qinglang Miao
  2020-12-01 12:54 ` [PATCH 1/3] drm/rockchip: cdn-dp: " Qinglang Miao
  0 siblings, 1 reply; 5+ messages in thread
From: Qinglang Miao @ 2020-12-01 12:54 UTC (permalink / raw)
  To: Sandy Huang, Heiko Stübner, David Airlie, Daniel Vetter
  Cc: dri-devel, linux-arm-kernel, linux-rockchip, linux-kernel, Qinglang Miao

pm_runtime_get_sync will increment the PM reference count
even failed. Forgetting to putting operation will result
in a reference leak here. 

Replace it with pm_runtime_resume_and_get to keep usage
counter balanced. 

BTW, pm_runtime_resume_and_get is introduced in v5.10-rc5 as
dd8088d5a896 ("PM: runtime: Add  pm_runtime_resume_and_get
to dealwith usage counter")

Qinglang Miao (3):
  drm/rockchip: cdn-dp: fix reference leak when pm_runtime_get_sync
    fails
  drm/rockchip: vop: fix reference leak when pm_runtime_get_sync fails
  drm/rockchip: lvds: fix reference leak when pm_runtime_get_sync fails

 drivers/gpu/drm/rockchip/cdn-dp-core.c      | 2 +-
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 ++--
 drivers/gpu/drm/rockchip/rockchip_lvds.c    | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

-- 
2.23.0


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

end of thread, other threads:[~2020-12-01 12:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-30 13:44 [PATCH 0/3] drm/rockchip: fix reference leak of pm_runtime_get_sync Qinglang Miao
2020-11-30 13:44 ` [PATCH 1/3] drm/rockchip: cdn-dp: fix reference leak when pm_runtime_get_sync fails Qinglang Miao
2020-11-30 13:44 ` [PATCH 2/3] drm/rockchip: vop: " Qinglang Miao
2020-11-30 13:44 ` [PATCH 3/3] drm/rockchip: lvds: " Qinglang Miao
2020-12-01 12:54 [PATCH 0/3] drm/rockchip: " Qinglang Miao
2020-12-01 12:54 ` [PATCH 1/3] drm/rockchip: cdn-dp: " Qinglang Miao

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