diff --git a/kernel/events/core.c b/kernel/events/core.c index 1e4841ebc22e..872d149b1959 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -11232,12 +11232,10 @@ static umode_t pmu_dev_is_visible(struct kobject *kobj, struct attribute *a, int struct device *dev = kobj_to_dev(kobj); struct pmu *pmu = dev_get_drvdata(dev); - if (!pmu->nr_addr_filters) + if (n == 2 && !pmu->nr_addr_filters) return 0; return a->mode; - - return 0; } static struct attribute_group pmu_dev_attr_group = {