linux-user: Convert signal number for FUTEX_FD
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 29 Aug 2022 02:10:02 +0000 (19:10 -0700)
committerLaurent Vivier <laurent@vivier.eu>
Tue, 27 Sep 2022 11:19:05 +0000 (13:19 +0200)
The val argument to FUTEX_FD is a signal number.  Convert to match
the host, as it will be converted back when the signal is delivered.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20220829021006.67305-5-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/syscall.c

index e2b6b564e6cbbb7ec69092c3aec74541b99a92b3..3f144e3c1f5df007f3a1200e1e8fe7f0e1a3c736 100644 (file)
@@ -7793,6 +7793,7 @@ static int do_futex(CPUState *cpu, bool time64, target_ulong uaddr,
         timeout = 0;
         break;
     case FUTEX_FD:
+        val = target_to_host_signal(val);
         timeout = 0;
         break;
     case FUTEX_CMP_REQUEUE: