summaryrefslogtreecommitdiff
path: root/drivers/perf/thunderx2_pmu.c
diff options
context:
space:
mode:
authorQi Liu <liuqi115@huawei.com>2020-07-17 11:49:23 +0300
committerWill Deacon <will@kernel.org>2020-07-17 12:51:44 +0300
commitf32ed8eb0e3f0d0ef4ddb854554d60ca5863a9f9 (patch)
tree455b30ad8a4efffe84e472e9036fcd319eab0f82 /drivers/perf/thunderx2_pmu.c
parentbd024e82e4cd95c7f1a475a55f99871936c2b2db (diff)
downloadlinux-f32ed8eb0e3f0d0ef4ddb854554d60ca5863a9f9.tar.xz
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>
Diffstat (limited to 'drivers/perf/thunderx2_pmu.c')
-rw-r--r--drivers/perf/thunderx2_pmu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/perf/thunderx2_pmu.c b/drivers/perf/thunderx2_pmu.c
index 51b31d6ff2c4..aac9823b0c6b 100644
--- a/drivers/perf/thunderx2_pmu.c
+++ b/drivers/perf/thunderx2_pmu.c
@@ -1017,6 +1017,7 @@ static struct platform_driver tx2_uncore_driver = {
.driver = {
.name = "tx2-uncore-pmu",
.acpi_match_table = ACPI_PTR(tx2_uncore_acpi_match),
+ .suppress_bind_attrs = true,
},
.probe = tx2_uncore_probe,
.remove = tx2_uncore_remove,