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] [thread-next>] [day] [month] [year] [list]
Message-ID: <318665ae-0852-1350-b43f-bbf929b1cb4f@linaro.org>
Date:   Tue, 30 Oct 2018 14:35:20 +0100
From:   Daniel Lezcano <daniel.lezcano@...aro.org>
To:     Viresh Kumar <viresh.kumar@...aro.org>
Cc:     "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>
Subject: Re: [PATCH 1/4] base/drivers/arch_topology: Remove useless check

On 30/10/2018 09:33, Viresh Kumar wrote:
> On 30-10-18, 08:55, Daniel Lezcano wrote:
>> The workqueue is called from init_cpu_capacity_callback(). This one is
>> called in the notifier callback. IOW the notification callback
>> unregisters itself. But if it is not registered, it won't unregister,
>> hence it won't call the workqueue and init_cpu_capacity_notifier() is
>> not called.
> 
> Sorry, couldn't understand most of your reply :)

Logical, I didn't understand your initial comment :)

> Though let me try to explain the problem I was trying to show you..
> 
> cpufreq-notifier-callback
>         -> init_cpu_capacity_callback()
>                 -> free raw capacity
>                 -> queue_work() to unregister the notifier
>                 -> return
> 
>         ->init_cpu_capacity_callback() called again before work was processed.
>                 -> If we don't check raw_capacity, we may end up using
>                 NULL pointer, as the notifier isn't unregistered yet.

Oh, nice catch.

I'm wondering if having a statically per_cpu variable, even if it is not
free at the end, isn't worth regarding the twisted code we end up with
an allocation.




-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ