qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] linux-user: Adjust child_tidptr on set_tid_address() syscall


From: Helge Deller
Subject: [PATCH] linux-user: Adjust child_tidptr on set_tid_address() syscall
Date: Fri, 27 May 2022 17:46:32 +0200

Keep track of the new child tidptr given by a set_tid_address() syscall.

Signed-off-by: Helge Deller <deller@gmx.de>

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index f65045efe6..fdf5c1c03e 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -12202,7 +12202,11 @@ static abi_long do_syscall1(void *cpu_env, int num, 
abi_long arg1,

 #if defined(TARGET_NR_set_tid_address) && defined(__NR_set_tid_address)
     case TARGET_NR_set_tid_address:
-        return get_errno(set_tid_address((int *)g2h(cpu, arg1)));
+    {
+        TaskState *ts = cpu->opaque;
+        ts->child_tidptr = arg1;
+        return get_errno(set_tid_address((int *)g2h(cpu, ts->child_tidptr)));
+    }
 #endif

     case TARGET_NR_tkill:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]