linux/drivers/perf
Xiaomeng Tong 2012a9e279 perf: qcom_l2_pmu: fix an incorrect NULL check on list iterator
The bug is here:
	return cluster;

The list iterator value 'cluster' will *always* be set and non-NULL
by list_for_each_entry(), so it is incorrect to assume that the
iterator value will be NULL if the list is empty or no element
is found.

To fix the bug, return 'cluster' when found, otherwise return NULL.

Cc: stable@vger.kernel.org
Fixes: 21bdbb7102 ("perf: add qcom l2 cache perf events driver")
Signed-off-by: Xiaomeng Tong <xiam0nd.tong@gmail.com>
Link: https://lore.kernel.org/r/20220327055733.4070-1-xiam0nd.tong@gmail.com
Signed-off-by: Will Deacon <will@kernel.org>
2022-04-04 10:50:02 +01:00
..
hisilicon perf: replace bitmap_weight with bitmap_empty where appropriate 2022-02-15 14:38:57 +00:00
apple_m1_cpu_pmu.c drivers/perf: Add Apple icestorm/firestorm CPU PMU driver 2022-03-08 13:32:48 +00:00
arm_dmc620_pmu.c perf/arm-dmc620: Use irq_set_affinity() 2021-05-24 11:01:59 +01:00
arm_dsu_pmu.c perf/arm-dsu: Use irq_set_affinity() 2021-05-24 11:02:00 +01:00
arm_pmu_acpi.c drivers/perf: arm_pmu_acpi: Fix incorrect checking of gicc pointer 2020-03-02 12:07:35 +00:00
arm_pmu_platform.c perf/arm_pmu_platform: Clean up with dev_printk 2021-03-30 11:41:50 +01:00
arm_pmu.c Merge branch 'for-next/perf-m1' into for-next/perf 2022-03-08 13:33:34 +00:00
arm_smmuv3_pmu.c perf/smmuv3: Don't cast parameter in bit operations 2022-02-15 16:51:26 +00:00
arm_spe_pmu.c perf: arm_spe: use DEVICE_ATTR_RO macro 2021-06-01 14:25:09 +01:00
arm-cci.c perf: replace bitmap_weight with bitmap_empty where appropriate 2022-02-15 14:38:57 +00:00
arm-ccn.c perf/arm-ccn: Use platform_get_irq() to get the interrupt 2022-02-08 14:25:35 +00:00
arm-cmn.c perf/arm-cmn: Update watchpoint format 2022-03-08 11:02:26 +00:00
fsl_imx8_ddr_perf.c drivers/perf: fix the missed ida_simple_remove() in ddr_perf_probe() 2021-06-17 19:45:24 +01:00
Kconfig RISC-V Patches for the 5.18 Merge Window, Part 1 2022-03-25 10:11:38 -07:00
Makefile RISC-V Patches for the 5.18 Merge Window, Part 1 2022-03-25 10:11:38 -07:00
marvell_cn10k_ddr_pmu.c perf/marvell: Fix !CONFIG_OF build for CN10K DDR PMU driver 2022-03-09 12:31:00 +00:00
marvell_cn10k_tad_pmu.c perf/marvell_cn10k: Fix unused variable warning when W=1 and CONFIG_OF=n 2022-02-08 15:12:28 +00:00
qcom_l2_pmu.c perf: qcom_l2_pmu: fix an incorrect NULL check on list iterator 2022-04-04 10:50:02 +01:00
qcom_l3_pmu.c drivers/perf: Simplify EVENT ATTR macro in qcom_l3_pmu.c 2021-06-11 11:18:40 +01:00
riscv_pmu_legacy.c RISC-V: Add a simple platform driver for RISC-V legacy perf 2022-03-21 14:58:25 -07:00
riscv_pmu_sbi.c RISC-V: Add sscofpmf extension support 2022-03-21 15:01:09 -07:00
riscv_pmu.c RISC-V: Add perf platform driver based on SBI PMU extension 2022-03-21 14:58:33 -07:00
thunderx2_pmu.c perf: Replace acpi_bus_get_device() 2022-02-08 15:14:53 +00:00
xgene_pmu.c perf: replace bitmap_weight with bitmap_empty where appropriate 2022-02-15 14:38:57 +00:00