]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
perf/arm: Add missing .suppress_bind_attrs
authorRobin Murphy <robin.murphy@arm.com>
Wed, 2 Jul 2025 14:08:13 +0000 (15:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Aug 2025 16:30:33 +0000 (18:30 +0200)
[ Upstream commit 860a831de138a7ad6bc86019adaf10eb84c02655 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/perf/arm-cmn.c
drivers/perf/arm-ni.c

index ff17e0f95fbb84cb64677fd7165781470c276da2..978b239ec10bdefc68e348c6c665f7321a3f0a3a 100644 (file)
@@ -2661,6 +2661,7 @@ static struct platform_driver arm_cmn_driver = {
                .name = "arm-cmn",
                .of_match_table = of_match_ptr(arm_cmn_of_match),
                .acpi_match_table = ACPI_PTR(arm_cmn_acpi_match),
+               .suppress_bind_attrs = true,
        },
        .probe = arm_cmn_probe,
        .remove_new = arm_cmn_remove,
index 4b9d53dae8978bc1539477f07e36eb418620b3c5..fb09730a9aa0e03da3770d96bb35419ea79eb6e6 100644 (file)
@@ -710,6 +710,7 @@ static struct platform_driver arm_ni_driver = {
                .name = "arm-ni",
                .of_match_table = of_match_ptr(arm_ni_of_match),
                .acpi_match_table = ACPI_PTR(arm_ni_acpi_match),
+               .suppress_bind_attrs = true,
        },
        .probe = arm_ni_probe,
        .remove = arm_ni_remove,