[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0f36ca48-09ab-4fca-8a8d-7ed3b2abc056@amd.com>
Date: Mon, 10 Mar 2025 21:05:45 +0530
From: Ravi Bangoria <ravi.bangoria@....com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: mingo@...nel.org, lucas.demarchi@...el.com, linux-kernel@...r.kernel.org,
acme@...nel.org, namhyung@...nel.org, mark.rutland@....com,
alexander.shishkin@...ux.intel.com, jolsa@...nel.org, irogers@...gle.com,
adrian.hunter@...el.com, kan.liang@...ux.intel.com,
Ravi Bangoria <ravi.bangoria@....com>
Subject: Re: [PATCH v3 7/7] perf: Make perf_pmu_unregister() useable
> @@ -207,6 +207,7 @@ static void perf_ctx_unlock(struct perf_
> }
>
> #define TASK_TOMBSTONE ((void *)-1L)
> +#define EVENT_TOMBSTONE ((void *)-1L)
>
> static bool is_kernel_event(struct perf_event *event)
> {
> @@ -2348,6 +2349,11 @@ static void perf_child_detach(struct per
>
> sync_child_event(event);
> list_del_init(&event->child_list);
> + /*
> + * Cannot set to NULL, as that would confuse the situation vs
> + * not being a child event. See for example unaccount_event().
> + */
> + event->parent = EVENT_TOMBSTONE;
This will cause issues where we do `event = event->parent`. No? For ex:
perf_pmu_unregister()
...
perf_event_exit_event()
perf_event_wakeup()
ring_buffer_wakeup()
if (event->parent)
event = event->parent;
Thanks,
Ravi
Powered by blists - more mailing lists