qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: Pranith Kumar <bobby.prani@gmail.com>, alex.bennee@linaro.org
Cc: qemu-devel@nongnu.org, rth@twiddle.net, peter.maydell@linaro.org,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3 1/2] linux-user: fix settime old value location
Date: Thu, 19 Jan 2017 16:05:27 +0100	[thread overview]
Message-ID: <96ad6596-573e-2b29-83ab-fc45b74a1ce0@vivier.eu> (raw)
In-Reply-To: <20170119142311.8310-1-bobby.prani@gmail.com>

Le 19/01/2017 à 15:23, Pranith Kumar a écrit :
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> old_value is the 4th argument of timer_settime(), not the 2nd.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> ---
>  linux-user/syscall.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 7b77503f94..a393764a17 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -12024,10 +12024,14 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
>              timer_t htimer = g_posix_timers[timerid];
>              struct itimerspec hspec_new = {{0},}, hspec_old = {{0},};
>  
> -            target_to_host_itimerspec(&hspec_new, arg3);
> +            if (arg3 && target_to_host_itimerspec(&hspec_new, arg3)) {

arg3 cannot be NULL, see 8 lines above, you need to only check the
result of target_to_host_itimerspec().

Thanks,
Laurent

  parent reply	other threads:[~2017-01-19 15:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-19 14:23 [Qemu-devel] [PATCH v3 1/2] linux-user: fix settime old value location Pranith Kumar
2017-01-19 14:23 ` [Qemu-devel] [PATCH v3 2/2] linux-user: fix tcg/mmap test Pranith Kumar
2017-01-19 15:05 ` Laurent Vivier [this message]
2017-01-19 15:16   ` [Qemu-devel] [PATCH v3 1/2] linux-user: fix settime old value location Pranith Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=96ad6596-573e-2b29-83ab-fc45b74a1ce0@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=alex.bennee@linaro.org \
    --cc=bobby.prani@gmail.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).