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/handle.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/handle.c')
-rw-r--r-- | kernel/irq/handle.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c index 06b05a4d3007..893da67b7781 100644 --- a/kernel/irq/handle.c +++ b/kernel/irq/handle.c | |||
@@ -93,6 +93,8 @@ void __attribute__((weak)) arch_init_chip_data(struct irq_desc *desc, int cpu) | |||
93 | static void init_one_irq_desc(int irq, struct irq_desc *desc, int cpu) | 93 | static void init_one_irq_desc(int irq, struct irq_desc *desc, int cpu) |
94 | { | 94 | { |
95 | memcpy(desc, &irq_desc_init, sizeof(struct irq_desc)); | 95 | memcpy(desc, &irq_desc_init, sizeof(struct irq_desc)); |
96 | |||
97 | spin_lock_init(&desc->lock); | ||
96 | desc->irq = irq; | 98 | desc->irq = irq; |
97 | #ifdef CONFIG_SMP | 99 | #ifdef CONFIG_SMP |
98 | desc->cpu = cpu; | 100 | desc->cpu = cpu; |