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: <20200118085907.639cd8d683f961bb9310239d@kernel.org>
Date:   Sat, 18 Jan 2020 08:59:07 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     "Steven Rostedt (VMware)" <rostedt@...dmis.org>,
        Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] tracing/boot: Fix an IS_ERR() vs NULL bug

On Fri, 17 Jan 2020 08:30:07 +0300
Dan Carpenter <dan.carpenter@...cle.com> wrote:

> The trace_array_get_by_name() function doesn't return error pointers,
> it returns NULL on error.

Good catch! It used to use trace_array_create() which returns err_ptr,
but trace_array_get_by_name() doesn't anymore.

Acked-by: Masami Hiramatsu <mhiramat@...nel.org>

Thank you!


> 
> Fixes: 4f712a4d04a4 ("tracing/boot: Add instance node support")
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> ---
>  kernel/trace/trace_boot.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/trace/trace_boot.c b/kernel/trace/trace_boot.c
> index fa9603dc6469..cd541ac1cbc1 100644
> --- a/kernel/trace/trace_boot.c
> +++ b/kernel/trace/trace_boot.c
> @@ -322,7 +322,7 @@ trace_boot_init_instances(struct xbc_node *node)
>  			continue;
>  
>  		tr = trace_array_get_by_name(p);
> -		if (IS_ERR(tr)) {
> +		if (!tr) {
>  			pr_err("Failed to get trace instance %s\n", p);
>  			continue;
>  		}
> -- 
> 2.11.0
> 


-- 
Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ