xen: RTDS: fix another instance of the 'read NOW()' race
PATCH 1/1 xen: RTDS: fix another instance of the 'read NOW()' race
which was overlooked in 779511f4bf5ae ("sched: avoid races on time values read from NOW()").
---
Cc: Meng Xu <[email protected]>
Cc: George Dunlap <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Wei Liu <[email protected]>
--- xen/common/sched_rt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
xen/common/sched_rt.c +3 -1
@@ -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
[email protected]
http://lists.xen.org/xen-devel
Quoted 11 lines · Dario Faggioli
which was overlooked in
779511f4bf5ae("sched: avoid races on time values read fromNOW()").Reported-by Jan Beulich <[email protected]>Signed-off-by Dario Faggioli <[email protected]>---
Cc: Meng Xu <[email protected]>
Cc: George Dunlap <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Wei Liu <[email protected]>
---
Signature · 13 lines
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 [email protected] http://lists.xen.org/xen-devel
Quoted 5 lines · Dario Faggioli
which was overlooked in
779511f4bf5ae("sched: avoid races on time values read fromNOW()").Reported-by Jan Beulich <[email protected]>Signed-off-by Dario Faggioli <[email protected]>
Quoted 20 lines
---
Cc: Meng Xu <[email protected]>
Cc: George Dunlap <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Wei Liu <[email protected]>--- xen/common/sched_rt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)xen/common/sched_rt.c +1
-1@@ -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;
xen/common/sched_rt.c static void · line 853
Quoted 10 lines
xen/common/sched_rt.c +2
-0spinlock_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
[email protected]
http://lists.xen.org/xen-devel
Quoted 5 lines · Dario Faggioli
which was overlooked in
779511f4bf5ae("sched: avoid races on time values read fromNOW()").Reported-by Jan Beulich <[email protected]>Signed-off-by Dario Faggioli <[email protected]>
Quoted 20 lines
---
Cc: Meng Xu <[email protected]>
Cc: George Dunlap <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Wei Liu <[email protected]>--- xen/common/sched_rt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)xen/common/sched_rt.c +1
-1@@ -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;
xen/common/sched_rt.c static void · line 853
Quoted 10 lines
xen/common/sched_rt.c +2
-0spinlock_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
[email protected]
http://lists.xen.org/xen-devel