* [PATCH] xen: RTDS: fix another instance of the 'read NOW()' race
@ 2016-05-24 15:06 Dario Faggioli
2016-05-24 19:32 ` Meng Xu
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Dario Faggioli @ 2016-05-24 15:06 UTC (permalink / raw)
To: xen-devel; +Cc: Wei Liu, Meng Xu, Jan Beulich, George Dunlap
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>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] xen: RTDS: fix another instance of the 'read NOW()' race
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
2016-05-26 8:38 ` George Dunlap
2 siblings, 0 replies; 4+ messages in thread
From: Meng Xu @ 2016-05-24 19:32 UTC (permalink / raw)
To: Dario Faggioli; +Cc: xen-devel, Wei Liu, George Dunlap, Jan Beulich
On Tue, May 24, 2016 at 11:06 AM, Dario Faggioli
<dario.faggioli@citrix.com> 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>
> ---
> 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>
> ---
Reviewed-by: Meng Xu <mengxu@cis.upenn.edu>
--
Best Regards,
Meng
------------
Meng Xu
PhD Student in Computer and Information Science
University of Pennsylvania
http://www.cis.upenn.edu/~mengxu/
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] xen: RTDS: fix another instance of the 'read NOW()' race
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
2016-05-26 8:38 ` George Dunlap
2 siblings, 0 replies; 4+ messages in thread
From: Wei Liu @ 2016-05-24 20:05 UTC (permalink / raw)
To: Dario Faggioli; +Cc: xen-devel, Wei Liu, Meng Xu, Jan Beulich, George Dunlap
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] xen: RTDS: fix another instance of the 'read NOW()' race
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
@ 2016-05-26 8:38 ` George Dunlap
2 siblings, 0 replies; 4+ messages in thread
From: George Dunlap @ 2016-05-26 8:38 UTC (permalink / raw)
To: Dario Faggioli, xen-devel; +Cc: Wei Liu, Meng Xu, Jan Beulich
On 24/05/16 16:06, 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>
Acked-by: George Dunlap <george.dunlap@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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-05-26 8:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2016-05-26 8:38 ` George Dunlap
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.