mirror of
https://github.com/xemu-project/xemu.git
synced 2025-04-02 11:11:48 -04:00
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>
This commit is contained in:
parent
2c418853b9
commit
5fdefcf808
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue