Merge tag 'perf_urgent_for_v6.3_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fixes from Borislav Petkov:

- Check whether sibling events have been deactivated before adding them
to groups

- Update the proper event time tracking variable depending on the event
type

- Fix a memory overwrite issue due to using the wrong function argument
when outputting perf events

* tag 'perf_urgent_for_v6.3_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf: Fix check before add_event_to_groups() in perf_group_detach()
perf: fix perf_event_context->time
perf/core: Fix perf_output_begin parameter is incorrectly invoked in perf_event_bpf_output

Changed files
+3 -3
kernel
events
+3 -3
kernel/events/core.c
··· 2163 2163 /* Inherit group flags from the previous leader */ 2164 2164 sibling->group_caps = event->group_caps; 2165 2165 2166 - if (!RB_EMPTY_NODE(&event->group_node)) { 2166 + if (sibling->attach_state & PERF_ATTACH_CONTEXT) { 2167 2167 add_event_to_groups(sibling, event->ctx); 2168 2168 2169 2169 if (sibling->state == PERF_EVENT_STATE_ACTIVE) ··· 3872 3872 if (likely(!ctx->nr_events)) 3873 3873 return; 3874 3874 3875 - if (is_active ^ EVENT_TIME) { 3875 + if (!(is_active & EVENT_TIME)) { 3876 3876 /* start ctx time */ 3877 3877 __update_context_time(ctx, false); 3878 3878 perf_cgroup_set_timestamp(cpuctx); ··· 9187 9187 9188 9188 perf_event_header__init_id(&bpf_event->event_id.header, 9189 9189 &sample, event); 9190 - ret = perf_output_begin(&handle, data, event, 9190 + ret = perf_output_begin(&handle, &sample, event, 9191 9191 bpf_event->event_id.header.size); 9192 9192 if (ret) 9193 9193 return;