diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-10-28 08:10:47 -1000 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-10-28 08:10:47 -1000 |
commit | 4714de03329810b9ac57762b6bfdb73b123fedd5 (patch) | |
tree | 03894e3e4de87311d6da92ac78d351da81c3e91d | |
parent | 51a7691038c334db81b736faa6b4cc4778e751fc (diff) | |
parent | a71ef31485bb51b846e8db8b3a35e432cc15afb5 (diff) |
Merge tag 'perf-urgent-2023-10-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf event fix from Ingo Molnar:
"Fix a potential NULL dereference bug"
* tag 'perf-urgent-2023-10-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf/core: Fix potential NULL deref
-rw-r--r-- | kernel/events/core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c index d0663b9324e7..a2f2a9525d72 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -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; } |