All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Dario Faggioli <dario.faggioli@citrix.com>
Cc: xen-devel@lists.xenproject.org, Wei Liu <wei.liu2@citrix.com>,
	Meng Xu <mengxu@cis.upenn.edu>, Jan Beulich <jbeulich@suse.com>,
	George Dunlap <george.dunlap@citrix.com>
Subject: Re: [PATCH] xen: RTDS: fix another instance of the 'read NOW()' race
Date: Tue, 24 May 2016 21:05:36 +0100	[thread overview]
Message-ID: <20160524200536.GA19254@citrix.com> (raw)
In-Reply-To: <146410241867.30357.7157102219398554511.stgit@Solace.fritz.box>

On Tue, May 24, 2016 at 05:06:58PM +0200, Dario Faggioli wrote:
> which was overlooked in 779511f4bf5ae ("sched: avoid
> races on time values read from NOW()").
> 
> Reported-by: Jan Beulich <jbeulich@suse.com>
> Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>

Release-acked-by: Wei Liu <wei.liu2@citrix.com>

> ---
> Cc: Meng Xu <mengxu@cis.upenn.edu>
> Cc: George Dunlap <george.dunlap@citrix.com>
> Cc: Jan Beulich <JBeulich@suse.com>
> Cc: Wei Liu <wei.liu2@citrix.com>
> ---
>  xen/common/sched_rt.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/xen/common/sched_rt.c b/xen/common/sched_rt.c
> index 0946101..5b077d7 100644
> --- a/xen/common/sched_rt.c
> +++ b/xen/common/sched_rt.c
> @@ -840,12 +840,14 @@ static void
>  rt_vcpu_insert(const struct scheduler *ops, struct vcpu *vc)
>  {
>      struct rt_vcpu *svc = rt_vcpu(vc);
> -    s_time_t now = NOW();
> +    s_time_t now;
>      spinlock_t *lock;
>  
>      BUG_ON( is_idle_vcpu(vc) );
>  
>      lock = vcpu_schedule_lock_irq(vc);
> +
> +    now = NOW();
>      if ( now >= svc->cur_deadline )
>          rt_update_deadline(now, svc);
>  
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-05-24 20:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-24 15:06 [PATCH] xen: RTDS: fix another instance of the 'read NOW()' race Dario Faggioli
2016-05-24 19:32 ` Meng Xu
2016-05-24 20:05 ` Wei Liu [this message]
2016-05-26  8:38 ` George Dunlap

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=20160524200536.GA19254@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=dario.faggioli@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=mengxu@cis.upenn.edu \
    --cc=xen-devel@lists.xenproject.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.