mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
perf/core: Fix potential NULL deref
Smatch is awesome.
Fixes: 32671e3799 ("perf: Disallow mis-matched inherited group reads")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
committed by
Ingo Molnar
parent
05d3ef8bba
commit
a71ef31485
@@ -13372,7 +13372,8 @@ static int inherit_group(struct perf_event *parent_event,
|
||||
!perf_get_aux_event(child_ctr, leader))
|
||||
return -EINVAL;
|
||||
}
|
||||
leader->group_generation = parent_event->group_generation;
|
||||
if (leader)
|
||||
leader->group_generation = parent_event->group_generation;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user