linux/arch
Alexander Gordeev e7ec1d2eac s390/mcck: cleanup user process termination path
If a machine check interrupt hits while user process is
running __s390_handle_mcck() helper function is called
directly from the interrupt handler and terminates the
current process by calling make_task_dead() routine.

The make_task_dead() is not allowed to be called from
interrupt context which forces the machine check handler
switch to the kernel stack and enable local interrupts
first.

The __s390_handle_mcck() could also be called to service
pending work, but this time from the external interrupts
handler. It is the machine check handler that establishes
the work and schedules the external interrupt, therefore
the machine check interrupt itself should be disabled
while reading out the corresponding variable:

	local_mcck_disable();
	mcck = *this_cpu_ptr(&cpu_mcck);
	memset(this_cpu_ptr(&cpu_mcck), 0, sizeof(mcck));
	local_mcck_enable();

However, local_mcck_disable() does not have effect when
__s390_handle_mcck() is called directly form the machine
check handler, since the machine check interrupt is still
disabled. Therefore, it is not the opening bracket to the
following local_mcck_enable() function.

Simplify the user process termination flow by scheduling
the external interrupt and killing the affected process
from the interrupt context.

Assume a kernel-generated signal is always delivered and
ignore a value returned by do_send_sig_info() funciton.

Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Reviewed-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
2023-02-28 13:19:05 +01:00
..
alpha Scheduler updates in this cycle are: 2023-02-20 17:41:08 -08:00
arc arch/idle: Change arch_cpu_idle() behavior: always exit with IRQs disabled 2023-01-13 11:48:15 +01:00
arm Networking changes for 6.3. 2023-02-21 18:24:12 -08:00
arm64 Networking changes for 6.3. 2023-02-21 18:24:12 -08:00
csky arch/idle: Change arch_cpu_idle() behavior: always exit with IRQs disabled 2023-01-13 11:48:15 +01:00
hexagon arch/idle: Change arch_cpu_idle() behavior: always exit with IRQs disabled 2023-01-13 11:48:15 +01:00
ia64 Scheduler updates in this cycle are: 2023-02-20 17:41:08 -08:00
loongarch Networking changes for 6.3. 2023-02-21 18:24:12 -08:00
m68k m68k updates for v6.3 2023-02-21 15:17:34 -08:00
microblaze arch/idle: Change arch_cpu_idle() behavior: always exit with IRQs disabled 2023-01-13 11:48:15 +01:00
mips Power management updates for 6.3-rc1 2023-02-21 12:13:58 -08:00
nios2 arch/idle: Change arch_cpu_idle() behavior: always exit with IRQs disabled 2023-01-13 11:48:15 +01:00
openrisc arch/idle: Change arch_cpu_idle() behavior: always exit with IRQs disabled 2023-01-13 11:48:15 +01:00
parisc Scheduler updates in this cycle are: 2023-02-20 17:41:08 -08:00
powerpc Scheduler updates in this cycle are: 2023-02-20 17:41:08 -08:00
riscv Networking changes for 6.3. 2023-02-21 18:24:12 -08:00
s390 s390/mcck: cleanup user process termination path 2023-02-28 13:19:05 +01:00
sh Networking changes for 6.3. 2023-02-21 18:24:12 -08:00
sparc Scheduler updates in this cycle are: 2023-02-20 17:41:08 -08:00
um arch/idle: Change arch_cpu_idle() behavior: always exit with IRQs disabled 2023-01-13 11:48:15 +01:00
x86 Networking changes for 6.3. 2023-02-21 18:24:12 -08:00
xtensa Linux 6.2-rc6 2023-01-31 15:01:20 +01:00
.gitignore
Kconfig