linux/arch
Sebastian Andrzej Siewior 4ff6b67ad1 kernel/irq_work: fix no_hz deadlock
Invoking NO_HZ's irq_work callback from timer irq is not working very
well if the callback decides to invoke hrtimer_cancel():

|hrtimer_try_to_cancel+0x55/0x5f
|hrtimer_cancel+0x16/0x28
|tick_nohz_restart+0x17/0x72
|__tick_nohz_full_check+0x8e/0x93
|nohz_full_kick_work_func+0xe/0x10
|irq_work_run_list+0x39/0x57
|irq_work_tick+0x60/0x67
|update_process_times+0x57/0x67
|tick_sched_handle+0x4a/0x59
|tick_sched_timer+0x3b/0x64
|__run_hrtimer+0x7a/0x149
|hrtimer_interrupt+0x1cc/0x2c5

and here we deadlock while waiting for the lock which we are holding.
To fix this I'm doing the same thing that upstream is doing: is the
irq_work dedicated IRQ and use it only for what is marked as "hirq"
which should only be the FULL_NO_HZ related work.

Cc: stable-rt@vger.kernel.org
Reported-by: Carsten Emde <C.Emde@osadl.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
[ Added back in_irq() check for non PREEMPT_RT configs ]
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2020-10-14 00:59:25 +03:00
..
alpha mm: pagefault_disabled() 2020-10-14 00:59:09 +03:00
arc ARC: signal handling robustify 2015-05-13 05:17:00 -07:00
arm kernel/irq_work: fix no_hz deadlock 2020-10-14 00:59:25 +03:00
arm64 KVM: ARM/arm64: avoid returning negative error code as bool 2015-06-29 12:25:38 -07:00
avr32 mm: pagefault_disabled() 2020-10-14 00:59:09 +03:00
blackfin Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2014-01-31 09:31:14 -08:00
c6x C6x: time: Ensure consistency in __init 2015-05-06 21:59:21 +02:00
cris mm: pagefault_disabled() 2020-10-14 00:59:09 +03:00
frv mm: pagefault_disabled() 2020-10-14 00:59:09 +03:00
hexagon Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-01-25 11:17:34 -08:00
ia64 mm: pagefault_disabled() 2020-10-14 00:59:09 +03:00
m32r mm: pagefault_disabled() 2020-10-14 00:59:09 +03:00
m68k mm: pagefault_disabled() 2020-10-14 00:59:09 +03:00
metag vm: add VM_FAULT_SIGSEGV handling support 2015-04-29 10:31:55 +02:00
microblaze mm: pagefault_disabled() 2020-10-14 00:59:09 +03:00
mips mips: rt: Replace pagefault_* to raw version 2020-10-14 00:59:24 +03:00
mn10300 mm: pagefault_disabled() 2020-10-14 00:59:09 +03:00
openrisc vm: add VM_FAULT_SIGSEGV handling support 2015-04-29 10:31:55 +02:00
parisc mm: pagefault_disabled() 2020-10-14 00:59:09 +03:00
powerpc kernel/irq_work: fix no_hz deadlock 2020-10-14 00:59:25 +03:00
s390 mm: pagefault_disabled() 2020-10-14 00:59:09 +03:00
score mm: pagefault_disabled() 2020-10-14 00:59:09 +03:00
sh softirq-disable-softirq-stacks-for-rt.patch 2020-10-14 00:59:15 +03:00
sparc kernel/irq_work: fix no_hz deadlock 2020-10-14 00:59:25 +03:00
tile mm: pagefault_disabled() 2020-10-14 00:59:09 +03:00
um mm: pagefault_disabled() 2020-10-14 00:59:09 +03:00
unicore32 nosave: consolidate __nosave_{begin,end} in <asm/sections.h> 2015-05-06 21:59:21 +02:00
x86 kernel/irq_work: fix no_hz deadlock 2020-10-14 00:59:25 +03:00
xtensa mm: pagefault_disabled() 2020-10-14 00:59:09 +03:00
.gitignore
Kconfig kconfig-disable-a-few-options-rt.patch 2020-10-14 00:59:10 +03:00