Skip to content

Commit 860a831

Browse files
rmurphy-armwilldeacon
authored andcommitted
perf/arm: Add missing .suppress_bind_attrs
PMU drivers should set .suppress_bind_attrs so that userspace is denied the opportunity to pull the driver out from underneath an in-use PMU (with predictably unpleasant consequences). Somehow both the CMN and NI drivers have managed to miss this; put that right. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Reviewed-by: Leo Yan <leo.yan@arm.com> Link: https://lore.kernel.org/r/acd48c341b33b96804a3969ee00b355d40c546e2.1751465293.git.robin.murphy@arm.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent a7bfae2 commit 860a831

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/perf/arm-cmn.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2656,6 +2656,7 @@ static struct platform_driver arm_cmn_driver = {
26562656
.name = "arm-cmn",
26572657
.of_match_table = of_match_ptr(arm_cmn_of_match),
26582658
.acpi_match_table = ACPI_PTR(arm_cmn_acpi_match),
2659+
.suppress_bind_attrs = true,
26592660
},
26602661
.probe = arm_cmn_probe,
26612662
.remove = arm_cmn_remove,

drivers/perf/arm-ni.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,7 @@ static struct platform_driver arm_ni_driver = {
709709
.name = "arm-ni",
710710
.of_match_table = of_match_ptr(arm_ni_of_match),
711711
.acpi_match_table = ACPI_PTR(arm_ni_acpi_match),
712+
.suppress_bind_attrs = true,
712713
},
713714
.probe = arm_ni_probe,
714715
.remove = arm_ni_remove,

0 commit comments

Comments
 (0)