WSL2-Linux-Kernel/arch/x86/events
Xiongfeng Wang 0358bc7cc2 perf/x86/intel/uncore: Fix reference count leak in __uncore_imc_init_box()
[ Upstream commit 17b8d847b9 ]

pci_get_device() will increase the reference count for the returned
pci_dev, so tgl_uncore_get_mc_dev() will return a pci_dev with its
reference count increased. We need to call pci_dev_put() to decrease the
reference count before exiting from __uncore_imc_init_box(). Add
pci_dev_put() for both normal and error path.

Fixes: fdb6482244 ("perf/x86: Add Intel Tiger Lake uncore support")
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
Link: https://lore.kernel.org/r/20221118063137.121512-5-wangxiongfeng2@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:14:02 +01:00
..
amd perf/amd/ibs: Use interrupt regs ip for stack unwinding 2022-06-09 10:22:55 +02:00
intel perf/x86/intel/uncore: Fix reference count leak in __uncore_imc_init_box() 2022-12-31 13:14:02 +01:00
zhaoxin x86: Fix various typos in comments 2021-03-18 15:31:53 +01:00
Kconfig perf/amd/uncore: Allow the driver to be built as a module 2021-08-26 09:14:36 +02:00
Makefile perf/x86/rapl: Fix RAPL config variable bug 2020-06-02 11:52:56 +02:00
core.c perf: Protect perf_guest_cbs with RCU 2022-01-20 09:13:14 +01:00
msr.c perf/x86/msr: Add Sapphire Rapids CPU support 2021-10-15 11:25:26 +02:00
perf_event.h perf/x86/intel: Apply mid ACK for small core 2021-08-06 14:25:15 +02:00
probe.c perf/x86/rapl: Add msr mask support 2021-02-10 14:44:54 +01:00
probe.h perf/x86/rapl: Add msr mask support 2021-02-10 14:44:54 +01:00
rapl.c perf/x86/rapl: fix AMD event handling 2022-02-16 12:56:11 +01:00