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>
23 lines
410 B
C
23 lines
410 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __ASM_CURRENT_H
|
|
#define __ASM_CURRENT_H
|
|
|
|
#include <linux/compiler.h>
|
|
#include <linux/threads.h>
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
struct task_struct;
|
|
extern struct task_struct *cpu_tasks[NR_CPUS];
|
|
|
|
static __always_inline struct task_struct *get_current(void)
|
|
{
|
|
return cpu_tasks[0];
|
|
}
|
|
|
|
|
|
#define current get_current()
|
|
|
|
#endif /* __ASSEMBLY__ */
|
|
|
|
#endif /* __ASM_CURRENT_H */
|