mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
UPSTREAM: perf/core: Fix potential NULL deref
Smatch is awesome. BUG: 361274701 (cherry picked from commita71ef31485) Fixes:32671e3799("perf: Disallow mis-matched inherited group reads") Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Change-Id: I7691e0aaaee70f1d0db3d1e33983d7236f72ed0c Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: 杨辉 <yanghui10@xiaomi.corp-partner.google.com>
This commit is contained in:
committed by
Akilesh Kailash
parent
faf32723dc
commit
514bdc80b9
@@ -13318,7 +13318,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