]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - kernel/cpu.c
cpu/hotplug: Prevent alloc/free of irq descriptors during CPU up/down (again)
[mirror_ubuntu-zesty-kernel.git] / kernel / cpu.c
index 341bf80f80bd685d529db77f6c4afdeda05f28ae..ec12b726fa6f056dda3176055619fdf5ce06982a 100644 (file)
@@ -349,8 +349,16 @@ static int bringup_cpu(unsigned int cpu)
        struct task_struct *idle = idle_thread_get(cpu);
        int ret;
 
+       /*
+        * Some architectures have to walk the irq descriptors to
+        * setup the vector space for the cpu which comes online.
+        * Prevent irq alloc/free across the bringup.
+        */
+       irq_lock_sparse();
+
        /* Arch-specific enabling code. */
        ret = __cpu_up(cpu, idle);
+       irq_unlock_sparse();
        if (ret) {
                cpu_notify(CPU_UP_CANCELED, cpu);
                return ret;