Skip to content

Commit

Permalink
genirq: NULL struct irq_desc's member 'name' in dynamic_irq_cleanup()
Browse files Browse the repository at this point in the history
If the member 'name' of the irq_desc structure happens to point to a
character string that is resident within a kernel module, problems ensue
if that module is rmmod'd (at which time dynamic_irq_cleanup() is called)
and then later show_interrupts() is called by someone.

It is also not a good thing if the character string resided in kmalloc'd
space that has been kfree'd (after having called dynamic_irq_cleanup()).
dynamic_irq_cleanup() fails to NULL the 'name' member and
show_interrupts() references it on a few architectures (like h8300, sh and
x86).

Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Dean Nelson authored and Ingo Molnar committed Oct 21, 2008
1 parent e9f95e6 commit b6f3b78
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kernel/irq/chip.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ void dynamic_irq_cleanup(unsigned int irq)
desc->chip_data = NULL;
desc->handle_irq = handle_bad_irq;
desc->chip = &no_irq_chip;
desc->name = NULL;
spin_unlock_irqrestore(&desc->lock, flags);
}

Expand Down

0 comments on commit b6f3b78

Please sign in to comment.