OSDN Git Service
(root)
/
sagit-ice-cold
/
kernel_xiaomi_msm8998.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f43660
)
genirq: Fix memory leak when calling irq_free_hwirqs()
author
Keith Busch
<keith.busch@intel.com>
Mon, 30 Jun 2014 22:24:44 +0000
(16:24 -0600)
committer
Thomas Gleixner
<tglx@linutronix.de>
Sat, 5 Jul 2014 19:42:08 +0000
(21:42 +0200)
irq_free_hwirqs() always calls irq_free_descs() with a cnt == 0
which makes it a no-op since the interrupt count to free is
decremented in itself.
Fixes:
7b6ef1262549f6afc5c881aaef80beb8fd15f908
Signed-off-by: Keith Busch <keith.busch@intel.com>
Acked-by: David Rientjes <rientjes@google.com>
Link:
http://lkml.kernel.org/r/1404167084-8070-1-git-send-email-keith.busch@intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/irq/irqdesc.c
patch
|
blob
|
history
diff --git
a/kernel/irq/irqdesc.c
b/kernel/irq/irqdesc.c
index
7339e42
..
1487a12
100644
(file)
--- a/
kernel/irq/irqdesc.c
+++ b/
kernel/irq/irqdesc.c
@@
-455,9
+455,9
@@
EXPORT_SYMBOL_GPL(irq_alloc_hwirqs);
*/
void irq_free_hwirqs(unsigned int from, int cnt)
{
- int i;
+ int i
, j
;
- for (i = from
; cnt > 0; i++, cnt
--) {
+ for (i = from
, j = cnt; j > 0; i++, j
--) {
irq_set_status_flags(i, _IRQ_NOREQUEST | _IRQ_NOPROBE);
arch_teardown_hwirq(i);
}