]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drivers/perf: Prevent forced unbinding of PMU drivers
authorQi Liu <liuqi115@huawei.com>
Fri, 17 Jul 2020 08:49:23 +0000 (16:49 +0800)
committerWill Deacon <will@kernel.org>
Fri, 17 Jul 2020 09:51:44 +0000 (10:51 +0100)
commitf32ed8eb0e3f0d0ef4ddb854554d60ca5863a9f9
tree455b30ad8a4efffe84e472e9036fcd319eab0f82
parentbd024e82e4cd95c7f1a475a55f99871936c2b2db
drivers/perf: Prevent forced unbinding of PMU drivers

Forcefully unbinding PMU drivers during perf sampling will lead to
a kernel panic, because the perf upper-layer framework call a NULL
pointer in this situation.

To solve this issue, "suppress_bind_attrs" should be set to true, so
that bind/unbind can be disabled via sysfs and prevent unbinding PMU
drivers during perf sampling.

Signed-off-by: Qi Liu <liuqi115@huawei.com>
Reviewed-by: John Garry <john.garry@huawei.com>
Link: https://lore.kernel.org/r/1594975763-32966-1-git-send-email-liuqi115@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
13 files changed:
drivers/perf/arm-cci.c
drivers/perf/arm-ccn.c
drivers/perf/arm_dsu_pmu.c
drivers/perf/arm_smmuv3_pmu.c
drivers/perf/arm_spe_pmu.c
drivers/perf/fsl_imx8_ddr_perf.c
drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c
drivers/perf/hisilicon/hisi_uncore_hha_pmu.c
drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c
drivers/perf/qcom_l2_pmu.c
drivers/perf/qcom_l3_pmu.c
drivers/perf/thunderx2_pmu.c
drivers/perf/xgene_pmu.c