qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Fix emulation of splice syscall


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] Fix emulation of splice syscall
Date: Wed, 4 Feb 2015 20:20:06 +0000

On 4 February 2015 at 16:37, Andreas Schwab <address@hidden> wrote:
> The second and fourth argument are in/out parameters, store them back
> after the syscall.  Also, the fourth argument was mishandled, and EFAULT
> handling was missing.
>
> Signed-off-by: Andreas Schwab <address@hidden>
> ---
>  linux-user/syscall.c | 16 +++++++++++++---
>  1 file changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index d4398b9..db2f5c7 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -9345,14 +9345,24 @@ abi_long do_syscall(void *cpu_env, int num, abi_long 
> arg1,
>              loff_t loff_in, loff_out;
>              loff_t *ploff_in = NULL, *ploff_out = NULL;
>              if(arg2) {
> -                get_user_u64(loff_in, arg2);
> +                if (get_user_u64(loff_in, arg2))
> +                    goto efault;

Coding style demands braces for all these if statements. Otherwise
Reviewed-by: Peter Maydell <address@hidden>

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]