diff options
author | Yinghai Lu <yinghai@kernel.org> | 2009-03-30 20:37:20 -0700 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-03 19:14:44 +0200 |
commit | 9756b15e1b58453a6fd54b85c1ad8515209e10bb (patch) | |
tree | 1b6ba55e845bbd07460c0c4e061641564b9a69b2 /include | |
parent | 8fe74cf053de7ad2124a894996f84fa890a81093 (diff) | |
download | blackbird-obmc-linux-9756b15e1b58453a6fd54b85c1ad8515209e10bb.tar.gz blackbird-obmc-linux-9756b15e1b58453a6fd54b85c1ad8515209e10bb.zip |
irq: fix cpumask memory leak on offstack cpumask kernels
Need to free the old cpumask for affinity and pending_mask.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
LKML-Reference: <49D18FF0.50707@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/irq.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index 974890b3c52f..99d147efe399 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -482,6 +482,16 @@ static inline void init_copy_desc_masks(struct irq_desc *old_desc, #endif } +static inline void free_desc_masks(struct irq_desc *old_desc, + struct irq_desc *new_desc) +{ + free_cpumask_var(old_desc->affinity); + +#ifdef CONFIG_GENERIC_PENDING_IRQ + free_cpumask_var(old_desc->pending_mask); +#endif +} + #else /* !CONFIG_SMP */ static inline bool init_alloc_desc_masks(struct irq_desc *desc, int cpu, @@ -495,6 +505,10 @@ static inline void init_copy_desc_masks(struct irq_desc *old_desc, { } +static inline void free_desc_masks(struct irq_desc *old_desc, + struct irq_desc *new_desc) +{ +} #endif /* CONFIG_SMP */ #endif /* _LINUX_IRQ_H */ |