Skip to content

Commit 388a1fb

Browse files
author
Peter Zijlstra
committed
perf: Fix the nr_addr_filters fix
Thomas reported that commit 652ffc2 ("perf/core: Fix narrow startup race when creating the perf nr_addr_filters sysfs file") made the entire attribute group vanish, instead of only the nr_addr_filters attribute. Additionally a stray return. Insufficient coffee was involved with both writing and merging the patch. Fixes: 652ffc2 ("perf/core: Fix narrow startup race when creating the perf nr_addr_filters sysfs file") Reported-by: Thomas Richter <tmricht@linux.ibm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by: Thomas Richter <tmricht@linux.ibm.com> Link: https://lkml.kernel.org/r/20231122100756.GP8262@noisy.programming.kicks-ass.net
1 parent bbb9686 commit 388a1fb

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

kernel/events/core.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11417,12 +11417,10 @@ static umode_t pmu_dev_is_visible(struct kobject *kobj, struct attribute *a, int
1141711417
struct device *dev = kobj_to_dev(kobj);
1141811418
struct pmu *pmu = dev_get_drvdata(dev);
1141911419

11420-
if (!pmu->nr_addr_filters)
11420+
if (n == 2 && !pmu->nr_addr_filters)
1142111421
return 0;
1142211422

1142311423
return a->mode;
11424-
11425-
return 0;
1142611424
}
1142711425

1142811426
static struct attribute_group pmu_dev_attr_group = {

0 commit comments

Comments
 (0)