]> git.baikalelectronics.ru Git - kernel.git/commit
genirq: Ensure IRQ descriptor is valid when setting-up the IRQ
authorJon Hunter <jonathanh@nvidia.com>
Tue, 10 May 2016 15:14:35 +0000 (16:14 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Wed, 11 May 2016 09:12:41 +0000 (10:12 +0100)
commit712d9b14d76486a07204bd7024ce59ea2e2f92f8
tree9d601b1a9c094bc4bc96934443158d8f454a8463
parent35c85e3f7afa18a1261d2682b118805ca0db8191
genirq: Ensure IRQ descriptor is valid when setting-up the IRQ

In the function, setup_irq(), we don't check that the descriptor
returned from irq_to_desc() is valid before we start using it. For
example chip_bus_lock() called from setup_irq(), assumes that the
descriptor pointer is valid and doesn't check before dereferencing it.

In many other functions including setup/free_percpu_irq() we do check
that the descriptor returned is not NULL and therefore add the same test
to setup_irq() to ensure the descriptor returned is valid.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
kernel/irq/manage.c