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] [day] [month] [year] [list]
Message-ID: <cd3f1c60-ae0f-8932-7096-95da5f6d419e@oracle.com>
Date:   Tue, 9 Jun 2020 09:30:49 -0700
From:   Divya Indi <divya.indi@...cle.com>
To:     Kefeng Wang <wangkefeng.wang@...wei.com>,
        linux-kernel@...r.kernel.org
Cc:     Steven Rostedt <rostedt@...dmis.org>,
        Aruna Ramakrishna <aruna.ramakrishna@...cle.com>
Subject: Re: [PATCH] sample-trace-array: Remove trace_array 'sample-instance'

Reviewed-by: Divya Indi <divya.indi@...cle.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@...wei.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;
>  }
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ