mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: qiang.zhang@windriver.com
To: bristot@redhat.com, rostedt@goodmis.org, bristot@kernel.org,
	mingo@redhat.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] trace/osnoise: fix missed cpus_read_unlock()
Date: Sun, 29 Aug 2021 13:52:06 +0800	[thread overview]
Message-ID: <20210829055206.137025-1-qiang.zhang@windriver.com> (raw)

From: "Qiang.zhang" <qiang.zhang@windriver.com>

When start_kthread() return error, the cpus_read_unlock() need
to be called.

Signed-off-by: Qiang.zhang <qiang.zhang@windriver.com>
---
 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;
 		}
 	}
-- 
2.25.1


             reply	other threads:[~2021-08-29  6:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-29  5:52 qiang.zhang [this message]
2021-08-30 17:26 ` Daniel Bristot de Oliveira
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=20210829055206.137025-1-qiang.zhang@windriver.com \
    --to=qiang.zhang@windriver.com \
    --cc=bristot@kernel.org \
    --cc=bristot@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.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®