From: Peter Zijlstra <peterz@infradead.org>
To: Li Zhong <floridsleeves@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
bpf@vger.kernel.org, namhyung@kernel.org, jolsa@kernel.org,
alexander.shishkin@linux.intel.com, mark.rutland@arm.com,
acme@kernel.org, mingo@redhat.com
Subject: Re: [PATCH v1] kernel/events/core: check return value of task_function_call()
Date: Mon, 19 Sep 2022 16:39:02 +0200 [thread overview]
Message-ID: <Yyh/BmvAHNMlENFw@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20220917014746.3828349-1-floridsleeves@gmail.com>
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@gmail.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
>
next prev parent reply other threads:[~2022-09-19 14:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-17 1:47 Li Zhong
2022-09-19 14:39 ` Peter Zijlstra [this message]
2022-09-19 18:36 ` Li Zhong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yyh/BmvAHNMlENFw@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=bpf@vger.kernel.org \
--cc=floridsleeves@gmail.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®