android_kernel_xiaomi_sm7250/kernel
Marc Zyngier 4763ddb834 genirq/irqdomain: Don't try to free an interrupt that has no mapping
[ Upstream commit 4615fbc3788ddc8e7c6d697714ad35a53729aa2c ]

When an interrupt allocation fails for N interrupts, it is pretty
common for the error handling code to free the same number of interrupts,
no matter how many interrupts have actually been allocated.

This may result in the domain freeing code to be unexpectedly called
for interrupts that have no mapping in that domain. Things end pretty
badly.

Instead, add some checks to irq_domain_free_irqs_hierarchy() to make sure
that thiss does not follow the hierarchy if no mapping exists for a given
interrupt.

Fixes: 6a6544e520 ("genirq/irqdomain: Remove auto-recursive hierarchy support")
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20201129135551.396777-1-maz@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:25:58 +01:00
..
bpf bpf: Fix a rcu warning for bpffs map pretty-print 2020-10-01 13:14:52 +02:00
cgroup cgroup: add missing skcd->no_refcnt check in cgroup_sk_clone() 2020-08-19 08:14:47 +02:00
configs
debug kgdb: Make "kgdbcon" work properly with "kgdb_earlycon" 2020-11-05 11:08:41 +01:00
dma swiotlb: fix "x86: Don't panic if can not alloc buffer for swiotlb" 2020-11-18 19:18:51 +01:00
events perf/core: Fix race in the perf_mmap_close() function 2020-11-18 19:18:52 +01:00
gcov gcov: add support for GCC 10.1 2020-09-17 13:45:31 +02:00
irq genirq/irqdomain: Don't try to free an interrupt that has no mapping 2020-12-30 11:25:58 +01:00
livepatch
locking locking/lockdep: Fix overflow in presentation of average lock-time 2020-09-03 11:24:21 +02:00
power PM: hibernate: remove the bogus call to get_gendisk() in software_resume() 2020-10-30 10:38:28 +01:00
printk printk: handle blank console arguments passed in. 2020-10-01 13:14:45 +02:00
rcu
sched sched: Reenable interrupts in do_sched_yield() 2020-12-30 11:25:50 +01:00
time random32: make prandom_u32() output unpredictable 2020-11-18 19:18:52 +01:00
trace tracing: Fix userstacktrace option for instances 2020-12-11 13:25:03 +01:00
.gitignore
acct.c
async.c
audit_fsnotify.c
audit_tree.c
audit_watch.c audit: CONFIG_CHANGE don't log internal bookkeeping as an event 2020-10-01 13:14:33 +02:00
audit.c audit: fix a net reference leak in audit_list_rules_send() 2020-06-22 09:05:13 +02:00
audit.h audit: fix a net reference leak in audit_list_rules_send() 2020-06-22 09:05:13 +02:00
auditfilter.c audit: fix a net reference leak in audit_list_rules_send() 2020-06-22 09:05:13 +02:00
auditsc.c
backtracetest.c
bounds.c
capability.c
compat.c make 'user_access_begin()' do 'access_ok()' 2020-06-22 09:04:58 +02:00
configs.c
context_tracking.c
cpu_pm.c kernel/cpu_pm: Fix uninitted local in cpu_pm 2020-06-22 09:05:28 +02:00
cpu.c kernel/cpu: add arch override for clear_tasks_mm_cpumask() mm handling 2020-12-30 11:25:45 +01:00
crash_core.c
crash_dump.c
cred.c
delayacct.c
dma.c
elfcore.c
exec_domain.c
exit.c don't dump the threads that had been already exiting when zapped. 2020-11-18 19:18:50 +01:00
extable.c
fail_function.c fail_function: Remove a redundant mutex unlock 2020-11-24 13:27:23 +01:00
fork.c fork: fix copy_process(CLONE_PARENT) race with the exiting ->real_parent 2020-11-10 12:36:00 +01:00
freezer.c
futex.c futex: Don't enable IRQs unconditionally in put_pi_state() 2020-11-18 19:18:49 +01:00
groups.c
hung_task.c
iomem.c
irq_work.c
jump_label.c
kallsyms.c kallsyms: Refactor kallsyms_show_value() to take cred 2020-07-16 08:17:26 +02:00
kcmp.c
Kconfig.freezer
Kconfig.hz
Kconfig.locks
Kconfig.preempt
kcov.c
kexec_core.c
kexec_file.c
kexec_internal.h
kexec.c
kmod.c kmod: make request_module() return an error when autoloading is disabled 2020-04-17 10:48:52 +02:00
kprobes.c kprobes: Fix compiler warning for !CONFIG_KPROBES_ON_FTRACE 2020-10-01 13:14:54 +02:00
ksysfs.c
kthread.c kthread_worker: prevent queuing delayed work from timer_fn when it is being canceled 2020-11-10 12:35:58 +01:00
latencytop.c
Makefile
memremap.c
module_signing.c
module-internal.h
module.c module: Correctly truncate sysfs sections output 2020-08-21 11:05:34 +02:00
notifier.c x86/mm: split vmalloc_sync_all() 2020-03-25 08:06:13 +01:00
nsproxy.c
padata.c padata: purge get_cpu and reorder_via_wq from padata_do_serial 2020-05-27 17:37:36 +02:00
panic.c
params.c
pid_namespace.c
pid.c
profile.c
ptrace.c ptrace: Set PF_SUPERPRIV when checking capability 2020-11-24 13:27:26 +01:00
range.c
reboot.c reboot: fix overflow parsing reboot cpu number 2020-11-18 19:18:52 +01:00
relay.c kernel/relay.c: fix memleak on destroy relay channel 2020-08-26 10:30:59 +02:00
resource.c
rseq.c
seccomp.c seccomp: Set PF_SUPERPRIV when checking capability 2020-11-24 13:27:26 +01:00
signal.c ptrace: fix task_join_group_stop() for the case when current is traced 2020-11-10 12:35:53 +01:00
smp.c
smpboot.c
smpboot.h
softirq.c
stacktrace.c
stop_machine.c
sys_ni.c
sys.c kernel/sys.c: avoid copying possible padding bytes in copy_to_user 2020-10-01 13:14:29 +02:00
sysctl_binary.c
sysctl.c
task_work.c
taskstats.c
test_kprobes.c
torture.c
tracepoint.c
tsacct.c
ucount.c
uid16.c
uid16.h
umh.c usermodehelper: reset umask to default before executing user process 2020-10-14 10:31:21 +02:00
up.c
user_namespace.c
user-return-notifier.c
user.c
utsname_sysctl.c
utsname.c
watchdog_hld.c
watchdog.c
workqueue_internal.h
workqueue.c workqueue: don't use wq_select_unbound_cpu() for bound works 2020-03-18 07:14:20 +01:00