1
0
Fork 0
alistair23-linux/include
Zhang Qilong 823f42bd61 PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter
[ Upstream commit dd8088d5a8 ]

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, which could resulted in
reference leak. It has been discussed a lot[0][1]. So we add a function
to deal with the usage counter for better coding.

[0]https://lkml.org/lkml/2020/6/14/88
[1]https://patchwork.ozlabs.org/project/linux-tegra/list/?series=178139
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Acked-by: Rafael J. Wysocki  <rafael.j.wysocki@intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:50:53 +01:00
..
acpi x86: ACPI: fix CPU hotplug deadlock 2020-04-23 10:36:38 +02:00
asm-generic arch: pgtable: define MAX_POSSIBLE_PHYSMEM_BITS where needed 2020-12-02 08:49:50 +01:00
clocksource clocksource/drivers/hyperv: Enable TSC page clocksource on 32bit 2019-08-23 16:59:54 +02:00
crypto crypto: algif_aead - Only wake up when ctx->more is zero 2020-08-21 13:05:30 +02:00
drm iommu/vt-d: Move intel_iommu_gfx_mapped to Intel IOMMU header 2020-11-24 13:29:17 +01:00
dt-bindings clk: imx8mn: Fix incorrect clock defines 2020-03-18 07:17:55 +01:00
keys KEYS: Don't write out to userspace while holding key semaphore 2020-04-23 10:36:45 +02:00
kvm KVM: arm/arm64: vgic: Use a single IO device per redistributor 2019-08-25 11:02:52 +01:00
linux PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter 2020-12-30 11:50:53 +01:00
math-emu nds32: Mark expected switch fall-throughs 2019-08-29 11:06:56 -05:00
media media: rc: add keymap for Videostrong KII Pro 2020-04-17 10:49:59 +02:00
misc
net netfilter: nftables_offload: set address type in control dissector 2020-12-11 13:23:33 +01:00
pcmcia
ras
rdma RDMA/umem: Fix signature of stub ib_umem_find_best_pgsz() 2020-10-29 09:57:47 +01:00
scsi scsi: libiscsi: Fix NOP race condition 2020-12-02 08:49:49 +01:00
soc irqchip/eznps: Fix build error for !ARC700 builds 2020-09-17 13:47:47 +02:00
sound ALSA: hda: fix jack detection with Realtek codecs when in D3 2020-10-29 09:57:25 +01:00
target scsi: target: fix hang when multiple threads try to destroy the same iscsi session 2020-04-21 09:05:04 +02:00
trace trace: fix potenial dangerous pointer 2020-12-02 08:49:46 +01:00
uapi ptrace: Prevent kernel-infoleak in ptrace_get_syscall_info() 2020-12-21 13:27:03 +01:00
vdso
video fbdev: da8xx: remove panel_power_ctrl() callback from platform data 2019-08-26 17:53:58 +05:30
xen xen/events: add a new "late EOI" evtchn framework 2020-11-05 11:43:10 +01:00