From: Divya Indi <divya.indi@oracle.com>
To: Kefeng Wang <wangkefeng.wang@huawei.com>, linux-kernel@vger.kernel.org
Cc: Steven Rostedt <rostedt@goodmis.org>,
Aruna Ramakrishna <aruna.ramakrishna@oracle.com>
Subject: Re: [PATCH] sample-trace-array: Remove trace_array 'sample-instance'
Date: Tue, 9 Jun 2020 09:30:49 -0700 [thread overview]
Message-ID: <cd3f1c60-ae0f-8932-7096-95da5f6d419e@oracle.com> (raw)
In-Reply-To: <20200609135200.2206726-1-wangkefeng.wang@huawei.com>
Reviewed-by: Divya Indi <divya.indi@oracle.com>
On 6/9/20 6:52 AM, Kefeng Wang wrote:
> Remove trace_array 'sample-instance' if kthread_run fails
> in sample_trace_array_init().
>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
> samples/ftrace/sample-trace-array.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/samples/ftrace/sample-trace-array.c b/samples/ftrace/sample-trace-array.c
> index 9e437f930280..6aba02a31c96 100644
> --- a/samples/ftrace/sample-trace-array.c
> +++ b/samples/ftrace/sample-trace-array.c
> @@ -115,8 +115,12 @@ static int __init sample_trace_array_init(void)
> trace_printk_init_buffers();
>
> simple_tsk = kthread_run(simple_thread, NULL, "sample-instance");
> - if (IS_ERR(simple_tsk))
> + if (IS_ERR(simple_tsk)) {
> + trace_array_put(tr);
> + trace_array_destroy(tr);
> return -1;
> + }
> +
> return 0;
> }
>
prev parent reply other threads:[~2020-06-09 16:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-09 13:52 Kefeng Wang
2020-06-09 16:30 ` Divya Indi [this message]
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=cd3f1c60-ae0f-8932-7096-95da5f6d419e@oracle.com \
--to=divya.indi@oracle.com \
--cc=aruna.ramakrishna@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=wangkefeng.wang@huawei.com \
/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®