diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-02-11 18:47:04 +0100 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2018-02-18 18:52:32 +0100 |
commit | 5fdefcf808a6d70a26e4c536cf0a0acad9b0fff3 (patch) | |
tree | 2be6b405e888714816c58f5eb5c5bde8013e4636 /linux-user | |
parent | 2c418853b9ba099b98834000386f54abe9aaec47 (diff) | |
download | qemu-5fdefcf808a6d70a26e4c536cf0a0acad9b0fff3.zip qemu-5fdefcf808a6d70a26e4c536cf0a0acad9b0fff3.tar.gz qemu-5fdefcf808a6d70a26e4c536cf0a0acad9b0fff3.tar.bz2 |
linux-user: Fix sched_getaffinity mask size
We properly computed the capped mask size to be put to the application
buffer, but didn't actually used it. Also, we need to return the capped mask
size instead of 0 on success.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20180211174704.27441-1-samuel.thibault@ens-lyon.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/syscall.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index effc3a0..e24f43c 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -10502,7 +10502,9 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, ret = arg2; } - ret = host_to_target_cpu_mask(mask, mask_size, arg3, arg2); + if (host_to_target_cpu_mask(mask, mask_size, arg3, ret)) { + goto efault; + } } } break; |