mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
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>
This commit is contained in:
@@ -707,6 +707,7 @@ static struct platform_driver imx_ddr_pmu_driver = {
|
||||
.driver = {
|
||||
.name = "imx-ddr-pmu",
|
||||
.of_match_table = imx_ddr_pmu_dt_ids,
|
||||
.suppress_bind_attrs = true,
|
||||
},
|
||||
.probe = ddr_perf_probe,
|
||||
.remove = ddr_perf_remove,
|
||||
|
Reference in New Issue
Block a user