Le 28/06/2016 à 21:12, riku.voi...@linaro.org a écrit :
> From: Peter Maydell <peter.mayd...@linaro.org>
> 
> Use the safe_syscall wrapper for fcntl. This is straightforward now
> that we always use 'struct fcntl64' on the host, as we don't need
> to select whether to call the host's fcntl64 or fcntl syscall
> (a detail that the libc previously hid for us).
> 
> Signed-off-by: Peter Maydell <peter.mayd...@linaro.org>
> Reviewed-by: Laurent Vivier <laur...@vivier.eu>
> Signed-off-by: Riku Voipio <riku.voi...@linaro.org>
> ---
>  linux-user/syscall.c | 34 +++++++++++++++++++++++-----------
>  1 file changed, 23 insertions(+), 11 deletions(-)
...
> @@ -10252,7 +10264,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long 
> arg1,
>              if (ret) {
>                  break;
>              }
> -            ret = get_errno(fcntl(arg1, cmd, &fl));
> +            ret = get_errno(safe_fcntl(arg1, cmd, &fl));
>           break;
>          default:
>              ret = do_fcntl(arg1, arg2, arg3);
> 

Peter,

435da5e709 linux-user: Use safe_syscall wrapper for fcntl

do you remember why you only convert to safe_fcntl() the
TARGET_F_SETLK64 and TARGET_F_SETLKW64 cases and not the
TARGET_F_GETLK64 one (in TARGET_NR_fcntl64)?

Thanks,
Laurent

Reply via email to