[PULL 33/38] linux-user: Convert signal number for FUTEX_FD

Laurent Vivier posted 38 patches 3 years, 4 months ago
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Laurent Vivier <laurent@vivier.eu>, Taylor Simpson <tsimpson@quicinc.com>, "Alex Bennée" <alex.bennee@linaro.org>
There is a newer version of this series
[PULL 33/38] linux-user: Convert signal number for FUTEX_FD
Posted by Laurent Vivier 3 years, 4 months ago
From: Richard Henderson <richard.henderson@linaro.org>

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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index e2b6b564e6cb..3f144e3c1f5d 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -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:
-- 
2.37.3