aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq/numa_migrate.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/irq/numa_migrate.c')
-rw-r--r--kernel/irq/numa_migrate.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/irq/numa_migrate.c b/kernel/irq/numa_migrate.c
index 666260e4c065..7f9b80434e32 100644
--- a/kernel/irq/numa_migrate.c
+++ b/kernel/irq/numa_migrate.c
@@ -78,7 +78,7 @@ static struct irq_desc *__real_move_irq_desc(struct irq_desc *old_desc,
78 desc = irq_desc_ptrs[irq]; 78 desc = irq_desc_ptrs[irq];
79 79
80 if (desc && old_desc != desc) 80 if (desc && old_desc != desc)
81 goto out_unlock; 81 goto out_unlock;
82 82
83 node = cpu_to_node(cpu); 83 node = cpu_to_node(cpu);
84 desc = kzalloc_node(sizeof(*desc), GFP_ATOMIC, node); 84 desc = kzalloc_node(sizeof(*desc), GFP_ATOMIC, node);
@@ -97,10 +97,15 @@ static struct irq_desc *__real_move_irq_desc(struct irq_desc *old_desc,
97 } 97 }
98 98
99 irq_desc_ptrs[irq] = desc; 99 irq_desc_ptrs[irq] = desc;
100 spin_unlock_irqrestore(&sparse_irq_lock, flags);
100 101
101 /* free the old one */ 102 /* free the old one */
102 free_one_irq_desc(old_desc, desc); 103 free_one_irq_desc(old_desc, desc);
104 spin_unlock(&old_desc->lock);
103 kfree(old_desc); 105 kfree(old_desc);
106 spin_lock(&desc->lock);
107
108 return desc;
104 109
105out_unlock: 110out_unlock:
106 spin_unlock_irqrestore(&sparse_irq_lock, flags); 111 spin_unlock_irqrestore(&sparse_irq_lock, flags);