lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <49da7dcf-f16a-47b7-96e8-8307d127e823@linux.intel.com>
Date: Thu, 8 Jan 2026 13:19:40 +0800
From: "Mi, Dapeng" <dapeng1.mi@...ux.intel.com>
To: Qing Wang <wangqing7171@...il.com>, Peter Zijlstra
 <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
 Arnaldo Carvalho de Melo <acme@...nel.org>,
 Namhyung Kim <namhyung@...nel.org>, linux-perf-users@...r.kernel.org,
 linux-kernel@...r.kernel.org
Cc: Mark Rutland <mark.rutland@....com>,
 Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
 Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>,
 Adrian Hunter <adrian.hunter@...el.com>, James Clark
 <james.clark@...aro.org>, Yeoreum Yun <yeoreum.yun@....com>
Subject: Re: [PATCH] perf/core: Drop an unused parameter 'ctx'


On 1/7/2026 2:43 PM, Qing Wang wrote:
> There is an unused parameter 'ctx' in perf_event_exit_event(), so drop it.
>
> Fixes: a3c3c66670ce ("perf/core: Fix child_total_time_enabled accounting bug at task exit")
> Signed-off-by: Qing Wang <wangqing7171@...il.com>
> ---
>  kernel/events/core.c | 19 ++++++++-----------
>  1 file changed, 8 insertions(+), 11 deletions(-)
>
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index dad0d3d2e85f..d4da96b3ab34 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -4584,7 +4584,6 @@ static void perf_event_enable_on_exec(struct perf_event_context *ctx)
>  
>  static void perf_remove_from_owner(struct perf_event *event);
>  static void perf_event_exit_event(struct perf_event *event,
> -				  struct perf_event_context *ctx,
>  				  struct task_struct *task,
>  				  bool revoke);
>  
> @@ -4613,7 +4612,7 @@ static void perf_event_remove_on_exec(struct perf_event_context *ctx)
>  
>  		modified = true;
>  
> -		perf_event_exit_event(event, ctx, ctx->task, false);
> +		perf_event_exit_event(event, ctx->task, false);
>  	}
>  
>  	raw_spin_lock_irqsave(&ctx->lock, flags);
> @@ -12511,12 +12510,12 @@ int perf_pmu_register(struct pmu *_pmu, const char *name, int type)
>  EXPORT_SYMBOL_GPL(perf_pmu_register);
>  
>  static void __pmu_detach_event(struct pmu *pmu, struct perf_event *event,
> -			       struct perf_event_context *ctx)
> +			       struct task_struct *task)
>  {
>  	/*
>  	 * De-schedule the event and mark it REVOKED.
>  	 */
> -	perf_event_exit_event(event, ctx, ctx->task, true);
> +	perf_event_exit_event(event, task, true);
>  
>  	/*
>  	 * All _free_event() bits that rely on event->pmu:
> @@ -12555,7 +12554,7 @@ static void pmu_detach_event(struct pmu *pmu, struct perf_event *event)
>  	struct perf_event_context *ctx;
>  
>  	ctx = perf_event_ctx_lock(event);
> -	__pmu_detach_event(pmu, event, ctx);
> +	__pmu_detach_event(pmu, event, ctx->task);
>  	perf_event_ctx_unlock(event, ctx);
>  
>  	scoped_guard (spinlock, &pmu->events_lock)
> @@ -14096,11 +14095,9 @@ static void sync_child_event(struct perf_event *child_event,
>  		     &parent_event->child_total_time_running);
>  }
>  
> -static void
> -perf_event_exit_event(struct perf_event *event,
> -		      struct perf_event_context *ctx,
> -		      struct task_struct *task,
> -		      bool revoke)
> +static void perf_event_exit_event(struct perf_event *event,
> +				  struct task_struct *task,
> +				  bool revoke)
>  {
>  	struct perf_event *parent_event = event->parent;
>  	unsigned long detach_flags = DETACH_EXIT;
> @@ -14217,7 +14214,7 @@ static void perf_event_exit_task_context(struct task_struct *task, bool exit)
>  		perf_event_task(task, ctx, 0);
>  
>  	list_for_each_entry_safe(child_event, next, &ctx->event_list, event_entry)
> -		perf_event_exit_event(child_event, ctx, exit ? task : NULL, false);
> +		perf_event_exit_event(child_event, exit ? task : NULL, false);
>  
>  	mutex_unlock(&ctx->mutex);

Reviewed-by: Dapeng Mi <dapeng1.mi@...ux.intel.com>


>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ