linux/arch/um/os-Linux
Tiwei Bie ba5a09630e um: Preserve errno within signal handler
[ Upstream commit f68b2d5a90 ]

We rely on errno to determine whether a syscall has failed, so we
need to ensure that accessing errno is async-signal-safe. Currently,
we preserve the errno in sig_handler_common(), but it doesn't cover
every possible case. Let's do it in hard_handler() instead, which
is the signal handler we actually register.

Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
Link: https://patch.msgid.link/20260106001228.1531146-2-tiwei.btw@antgroup.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-03-04 07:20:28 -05:00
..
skas um: Add missing trailing newline to help messages 2025-09-10 14:23:37 +02:00
elf_aux.c um: Add an internal header shared among the user code 2024-04-30 14:16:44 +02:00
execvp.c um: Allow builds with Clang 2022-03-21 08:13:03 -07:00
file.c um: Fix FD copy size in os_rcv_fd_msg() 2025-09-10 14:24:19 +02:00
helper.c um: Prohibit the VM_CLONE flag in run_helper_thread() 2025-03-20 09:26:38 +01:00
internal.h um: Implement kernel side of SECCOMP based process handling 2025-06-02 15:17:19 +02:00
irq.c um: Remove the unneeded result variable 2023-02-01 22:11:24 +01:00
main.c um: Remove unused THREAD_NAME_LEN macro 2025-01-10 13:49:57 +01:00
Makefile um: Remove obsolete legacy network transports 2025-05-05 10:26:59 +02:00
mem.c um: set DONTDUMP and DONTFORK flags on KASAN shadow memory 2024-11-07 17:36:30 +01:00
process.c um: Track userspace children dying in SECCOMP mode 2025-06-02 15:17:19 +02:00
registers.c um: Add SECCOMP support detection and initialization 2025-06-02 16:20:01 +02:00
sigio.c um: Fix tgkill compile error on old host OSes 2025-06-02 11:22:55 +02:00
signal.c um: Preserve errno within signal handler 2026-03-04 07:20:28 -05:00
start_up.c um: fix SECCOMP 32bit xstate register restore 2025-06-04 11:40:36 +02:00
time.c um: Remove unused timeval_to_ns() function 2022-03-11 10:49:50 +01:00
tty.c um: Add SPDX headers for files in arch/um/os-Linux 2019-09-15 21:37:17 +02:00
umid.c um: Do not propagate uml_dir parameter to kernel 2024-10-23 09:52:48 +02:00
user_syms.c Revert "[PATCH] uml: export symbols added by GCC hardened" 2023-06-15 04:47:04 +09:00
util.c um: Don't mark stack executable 2025-09-10 14:24:13 +02:00