mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
perf: Fix the nr_addr_filters fix
[ Upstream commit388a1fb7da
] Thomas reported that commit652ffc2104
("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:652ffc2104
("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 Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
34da3b9fa5
commit
ad2bd6cd17
1 changed files with 1 additions and 3 deletions
|
@ -10089,12 +10089,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 = {
|
||||
|
|
Loading…
Reference in a new issue