Commit a71ef314 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar
Browse files

perf/core: Fix potential NULL deref



Smatch is awesome.

Fixes: 32671e37 ("perf: Disallow mis-matched inherited group reads")
Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 05d3ef8b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -13372,6 +13372,7 @@ static int inherit_group(struct perf_event *parent_event,
		    !perf_get_aux_event(child_ctr, leader))
			return -EINVAL;
	}
	if (leader)
		leader->group_generation = parent_event->group_generation;
	return 0;
}