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]
Date:   Tue, 31 Aug 2021 01:47:08 +0000
From:   "Zhang, Qiang" <Qiang.Zhang@...driver.com>
To:     Daniel Bristot de Oliveira <bristot@...hat.com>,
        "rostedt@...dmis.org" <rostedt@...dmis.org>,
        "bristot@...nel.org" <bristot@...nel.org>,
        "mingo@...hat.com" <mingo@...hat.com>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] trace/osnoise: fix missed cpus_read_unlock()



________________________________________
From: Daniel Bristot de Oliveira <bristot@...hat.com>
Sent: Tuesday, 31 August 2021 01:26
To: Zhang, Qiang; rostedt@...dmis.org; bristot@...nel.org; mingo@...hat.com
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] trace/osnoise: fix missed cpus_read_unlock()

[Please note: This e-mail is from an EXTERNAL e-mail address]

>Hi Qiang,
>
>On 8/29/21 7:52 AM, qiang.zhang@...driver.com wrote:
> From: "Qiang.zhang" <qiang.zhang@...driver.com>
>set the Subject to:

>trace/osnoise: Fix missed cpus_read_unlock() in start_per_cpu_kthreads()
>
>
> When start_kthread() return error, the cpus_read_unlock() need
> to be called.
>
> Signed-off-by: Qiang.zhang <qiang.zhang@...driver.com>

>Add:
>
>Fixes: c8895e271f79 ("trace/osnoise: Support hotplug operations")
>Cc: <stable@...r.kernel.org> # v5.14+
>
> ---
>  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;
>               }
>       }
>
>Why not initialize retval = 0, and then remove the "return retval" from this if,
>returning rteval at the end of the function?
>

Thank you for your suggestion. I'll modify it and resend it. 

Qiang.zhang

>-- Daniel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ