lkml.org 
[lkml]   [2018]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/4] base/drivers/arch_topology: Remove useless check
    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 :)

    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.

    --
    viresh

    \
     
     \ /
      Last update: 2018-10-30 09:34    [W:3.149 / U:0.664 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site