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  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]
Date:   Wed, 30 Dec 2020 21:30:12 +0800
From:   Qiujun Huang <hqjagain@...il.com>
To:     Steven Rostedt <rostedt@...dmis.org>, mingo@...hat.com,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] trace: Remove get/put_cpu() from function_trace_init

Sorry, please ignore the patch

[trace] 2158a32526: BUG:using_smp_processor_id()in_preemptible

Thanks

On Fri, Dec 25, 2020 at 10:24 PM Qiujun Huang <hqjagain@...il.com> wrote:
>
> Since commit b6f11df26fdc ("trace: Call tracing_reset_online_cpus before
> tracer->init()"), get/put_cpu() are not needed anymore.
> We can use smp_processor_id() instead.
>
> Signed-off-by: Qiujun Huang <hqjagain@...il.com>
> ---
>  kernel/trace/trace_functions.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/kernel/trace/trace_functions.c b/kernel/trace/trace_functions.c
> index c5095dd28e20..e36fbb935017 100644
> --- a/kernel/trace/trace_functions.c
> +++ b/kernel/trace/trace_functions.c
> @@ -106,8 +106,7 @@ static int function_trace_init(struct trace_array *tr)
>
>         ftrace_init_array_ops(tr, func);
>
> -       tr->array_buffer.cpu = get_cpu();
> -       put_cpu();
> +       tr->array_buffer.cpu = smp_processor_id();
>
>         tracing_start_cmdline_record();
>         tracing_start_function_trace(tr);
> --
> 2.17.1
>

Powered by blists - more mailing lists