diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-12-26 13:02:20 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-27 03:29:22 -0500 |
commit | 793f7b12a0c95e7bfec1badf9628043fb78fd440 (patch) | |
tree | 1ace93d9f2bbed43b4594e6bacf75c51ffebf417 /kernel/irq/numa_migrate.c | |
parent | 8b07cd44511f3aa78dd912cca6493275a6787dc5 (diff) |
sparseirq: fix desc->lock init
Impact: cleanup
init_one_irq_desc() does not initialize the desc->lock properly -
you cannot init a lock by memcpying some other lock on it.
This happens to work right now (because irq_desc_init is never in use),
but it's a dangerous construct nevertheless, so fix it.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/irq/numa_migrate.c')
-rw-r--r-- | kernel/irq/numa_migrate.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/irq/numa_migrate.c b/kernel/irq/numa_migrate.c index a565ce3a4fb5..ecf765c6a77a 100644 --- a/kernel/irq/numa_migrate.c +++ b/kernel/irq/numa_migrate.c | |||
@@ -42,6 +42,7 @@ static void init_copy_one_irq_desc(int irq, struct irq_desc *old_desc, | |||
42 | struct irq_desc *desc, int cpu) | 42 | struct irq_desc *desc, int cpu) |
43 | { | 43 | { |
44 | memcpy(desc, old_desc, sizeof(struct irq_desc)); | 44 | memcpy(desc, old_desc, sizeof(struct irq_desc)); |
45 | spin_lock_init(&desc->lock); | ||
45 | desc->cpu = cpu; | 46 | desc->cpu = cpu; |
46 | lockdep_set_class(&desc->lock, &irq_desc_lock_class); | 47 | lockdep_set_class(&desc->lock, &irq_desc_lock_class); |
47 | init_copy_kstat_irqs(old_desc, desc, cpu, nr_cpu_ids); | 48 | init_copy_kstat_irqs(old_desc, desc, cpu, nr_cpu_ids); |