kernel-fxtec-pro1x/kernel/irq
Alexander Sverdlin 1b16ddb28b genirq/irqdomain: Check pointer in irq_domain_alloc_irqs_hierarchy()
[ Upstream commit 87f2d1c662fa1761359fdf558246f97e484d177a ]

irq_domain_alloc_irqs_hierarchy() has 3 call sites in the compilation unit
but only one of them checks for the pointer which is being dereferenced
inside the called function. Move the check into the function. This allows
for catching the error instead of the following crash:

Unable to handle kernel NULL pointer dereference at virtual address 00000000
PC is at 0x0
LR is at gpiochip_hierarchy_irq_domain_alloc+0x11f/0x140
...
[<c06c23ff>] (gpiochip_hierarchy_irq_domain_alloc)
[<c0462a89>] (__irq_domain_alloc_irqs)
[<c0462dad>] (irq_create_fwspec_mapping)
[<c06c2251>] (gpiochip_to_irq)
[<c06c1c9b>] (gpiod_to_irq)
[<bf973073>] (gpio_irqs_init [gpio_irqs])
[<bf974048>] (gpio_irqs_exit+0xecc/0xe84 [gpio_irqs])
Code: bad PC value

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200306174720.82604-1-alexander.sverdlin@nokia.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-17 10:48:41 +02:00
..
affinity.c
autoprobe.c genirq: Delay deactivation in free_irq() 2019-07-21 09:03:12 +02:00
chip.c genirq: Delay deactivation in free_irq() 2019-07-21 09:03:12 +02:00
cpuhotplug.c genirq: Delay deactivation in free_irq() 2019-07-21 09:03:12 +02:00
debug.h
debugfs.c x86/apic/msi: Plug non-maskable MSI affinity race 2020-02-11 04:34:18 -08:00
devres.c
dummychip.c
generic-chip.c
handle.c
internals.h genirq/proc: Reject invalid affinity masks (again) 2020-02-28 16:38:59 +01:00
ipi.c
irq_sim.c
irqdesc.c genirq: Properly pair kobject_del() with kobject_add() 2019-08-29 08:28:57 +02:00
irqdomain.c genirq/irqdomain: Check pointer in irq_domain_alloc_irqs_hierarchy() 2020-04-17 10:48:41 +02:00
Kconfig
Makefile
manage.c genirq: Fix reference leaks on irq affinity notifiers 2020-04-02 15:28:18 +02:00
matrix.c irq/matrix: Fix memory overallocation 2019-12-01 09:17:13 +01:00
migration.c
msi.c x86/apic/msi: Plug non-maskable MSI affinity race 2020-02-11 04:34:18 -08:00
pm.c
proc.c genirq/proc: Reject invalid affinity masks (again) 2020-02-28 16:38:59 +01:00
resend.c genirq: Prevent NULL pointer dereference in resend_irqs() 2019-09-19 09:09:34 +02:00
settings.h
spurious.c
timings.c