um: move thread info into task
authorBenjamin Berg <benjamin.berg@intel.com>
Mon, 11 Nov 2024 10:29:10 +0000 (11:29 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 12 Nov 2024 13:50:31 +0000 (14:50 +0100)
commit2f681ba4b352cdd5658ed2a96062375a12839755
tree8cc0179eb7c009f8c155acee180270918b93af23
parent0f659ff362eac69777c4c191b7e5ccb19d76c67d
um: move thread info into task

This selects the THREAD_INFO_IN_TASK option for UM and changes the way
that the current task is discovered. This is trivial though, as UML
already tracks the current task in cpu_tasks[] and this can be used to
retrieve it.

Also remove the signal handler code that copies the thread information
into the IRQ stack. It is obsolete now, which also means that the
mentioned race condition cannot happen anymore.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Reviewed-by: Hajime Tazaki <thehajime@gmail.com>
Link: https://patch.msgid.link/20241111102910.46512-1-benjamin@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 files changed:
arch/um/Kconfig
arch/um/include/asm/Kbuild
arch/um/include/asm/current.h [new file with mode: 0644]
arch/um/include/asm/thread_info.h
arch/um/include/shared/as-layout.h
arch/um/kernel/dyn.lds.S
arch/um/kernel/irq.c
arch/um/kernel/process.c
arch/um/kernel/skas/process.c
arch/um/kernel/um_arch.c
arch/um/kernel/uml.lds.S
arch/um/os-Linux/signal.c