• Peter Zijlstra's avatar
    smp: Allocate smp_call_on_cpu() workqueue on stack too · 8db54949
    Peter Zijlstra authored
    
    
    The SMP IPI struct descriptor is allocated on the stack except for the
    workqueue and lockdep complains:
    
      INFO: trying to register non-static key.
      the code is fine but needs lockdep annotation.
      turning off the locking correctness validator.
      CPU: 0 PID: 110 Comm: kworker/0:1 Not tainted 4.8.0-rc5+ #14
      Hardware name: Dell Inc. Precision T3600/0PTTT9, BIOS A13 05/11/2014
      Workqueue: events smp_call_on_cpu_callback
      ...
      Call Trace:
        dump_stack
        register_lock_class
        ? __lock_acquire
        __lock_acquire
        ? __lock_acquire
        lock_acquire
        ? process_one_work
        process_one_work
        ? process_one_work
        worker_thread
        ? process_one_work
        ? process_one_work
        kthread
        ? kthread_create_on_node
        ret_from_fork
    
    So allocate it on the stack too.
    Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    [ Test and write commit message. ]
    Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
    Signed-off-by: Peter Zijlstra (Intel) ...
    8db54949
smp.c 20.8 KB