]> git.ipfire.org Git - thirdparty/linux.git/commit
um: Preserve errno within signal handler
authorTiwei Bie <tiwei.btw@antgroup.com>
Tue, 6 Jan 2026 00:12:27 +0000 (08:12 +0800)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 13 Jan 2026 18:39:09 +0000 (19:39 +0100)
commitf68b2d5a907b53eed99cf2efcaaae116df73c298
tree835f5f3c92265987e9647c993a56eca2652b484d
parent0f61b1860cc3f52aef9036d7235ed1f017632193
um: Preserve errno within signal handler

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>
arch/um/os-Linux/signal.c