diff options
author | Qi Liu <liuqi115@huawei.com> | 2020-07-17 10:49:23 +0200 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2020-07-17 11:51:44 +0200 |
commit | f32ed8eb0e3f0d0ef4ddb854554d60ca5863a9f9 (patch) | |
tree | 455b30ad8a4efffe84e472e9036fcd319eab0f82 /drivers/perf/arm-cci.c | |
parent | asm-generic/mmiowb: Allow mmiowb_set_pending() when preemptible() (diff) | |
download | linux-f32ed8eb0e3f0d0ef4ddb854554d60ca5863a9f9.tar.xz linux-f32ed8eb0e3f0d0ef4ddb854554d60ca5863a9f9.zip |
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/arm-cci.c')
-rw-r--r-- | drivers/perf/arm-cci.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/perf/arm-cci.c b/drivers/perf/arm-cci.c index 1b8e337a29ca..87c4be9dd412 100644 --- a/drivers/perf/arm-cci.c +++ b/drivers/perf/arm-cci.c @@ -1718,6 +1718,7 @@ static struct platform_driver cci_pmu_driver = { .driver = { .name = DRIVER_NAME, .of_match_table = arm_cci_pmu_matches, + .suppress_bind_attrs = true, }, .probe = cci_pmu_probe, .remove = cci_pmu_remove, |