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] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yyh/BmvAHNMlENFw@hirez.programming.kicks-ass.net>
Date:   Mon, 19 Sep 2022 16:39:02 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Li Zhong <floridsleeves@...il.com>
Cc:     linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
        bpf@...r.kernel.org, namhyung@...nel.org, jolsa@...nel.org,
        alexander.shishkin@...ux.intel.com, mark.rutland@....com,
        acme@...nel.org, mingo@...hat.com
Subject: Re: [PATCH v1] kernel/events/core: check return value of
 task_function_call()

On Fri, Sep 16, 2022 at 06:47:46PM -0700, Li Zhong wrote:
> Check the return value of task_function_call(), which could be error
> code when the execution fails.

How is terminating the cgroup task iteration a useful thing? Also coding
style fail for not adding { }

> Signed-off-by: Li Zhong <floridsleeves@...il.com>
> ---
>  kernel/events/core.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index 2621fd24ad26..ac0cf611b12a 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -13520,7 +13520,8 @@ static void perf_cgroup_attach(struct cgroup_taskset *tset)
>  	struct cgroup_subsys_state *css;
>  
>  	cgroup_taskset_for_each(task, css, tset)
> -		task_function_call(task, __perf_cgroup_move, task);
> +		if (!task_function_call(task, __perf_cgroup_move, task))
> +			return;
>  }
>  
>  struct cgroup_subsys perf_event_cgrp_subsys = {
> -- 
> 2.25.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ