From: Daniel Bristot de Oliveira <bristot@redhat.com>
To: qiang.zhang@windriver.com, rostedt@goodmis.org,
bristot@kernel.org, mingo@redhat.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] trace/osnoise: fix missed cpus_read_unlock()
Date: Mon, 30 Aug 2021 19:26:43 +0200 [thread overview]
Message-ID: <fb07e806-71bf-6bac-ac3c-1d99136d6f8e@redhat.com> (raw)
In-Reply-To: <20210829055206.137025-1-qiang.zhang@windriver.com>
Hi Qiang,
On 8/29/21 7:52 AM, qiang.zhang@windriver.com wrote:
> From: "Qiang.zhang" <qiang.zhang@windriver.com>
set the Subject to:
trace/osnoise: Fix missed cpus_read_unlock() in start_per_cpu_kthreads()
>
> When start_kthread() return error, the cpus_read_unlock() need
> to be called.
>
> Signed-off-by: Qiang.zhang <qiang.zhang@windriver.com>
Add:
Fixes: c8895e271f79 ("trace/osnoise: Support hotplug operations")
Cc: <stable@vger.kernel.org> # v5.14+
> ---
> kernel/trace/trace_osnoise.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c
> index 65b08b8e5bf8..45d22d6f3acb 100644
> --- a/kernel/trace/trace_osnoise.c
> +++ b/kernel/trace/trace_osnoise.c
> @@ -1568,6 +1568,7 @@ static int start_per_cpu_kthreads(struct trace_array *tr)
> retval = start_kthread(cpu);
> if (retval) {
> stop_per_cpu_kthreads();
> + cpus_read_unlock();
> return retval;
> }
> }
Why not initialize retval = 0, and then remove the "return retval" from this if,
returning rteval at the end of the function?
-- Daniel
next prev parent reply other threads:[~2021-08-30 17:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-29 5:52 qiang.zhang
2021-08-30 17:26 ` Daniel Bristot de Oliveira [this message]
2021-08-31 1:47 ` Zhang, Qiang
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=fb07e806-71bf-6bac-ac3c-1d99136d6f8e@redhat.com \
--to=bristot@redhat.com \
--cc=bristot@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=qiang.zhang@windriver.com \
--cc=rostedt@goodmis.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®