xen: sched: fix spinlock issue in schedule_cpu_switch().
PATCH 1/1 xen: sched: fix spinlock issue in schedule_cpu_switch().
Commit 94734ab7c3f5 ("xen: sched: close potential races when switching scheduler to CPUs") buggily replaced a call to pcpu_schedule_lock_irq() with just pcpu_schedule_lock(), causing the relevant irq_safe vs. non-irq_safe ASSERT() in check_lock() to trigger.
Fix that.
---
Cc: George Dunlap <[email protected]>
Cc: Andrew Cooper <[email protected]>
Cc: Aaron Cornelius <[email protected]>
--- xen/common/schedule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/common/schedule.c +1 -1
@@ -1702,7 +1702,7 @@ int schedule_cpu_switch(unsigned int cpu, struct cpupool *c)* that the lock itself changed, and retry acquiring the new one (which * will be the correct, remapped one, at that point). */ - old_lock =pcpu_schedule_lock (cpu); + old_lock =pcpu_schedule_lock_irq (cpu); vpriv_old = idle->sched_priv; ppriv_old =per_cpu (schedule_data, cpu).sched_priv;
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 9 lines · Dario Faggioli
Commit
94734ab7c3f5("xen: sched: close potential races when switching scheduler to CPUs") buggily replaced a call topcpu_schedule_lock_irq()with justpcpu_schedule_lock(), causing the relevantirq_safevs. non-irq_safeASSERT()incheck_lock()to trigger.Fix that.
Signed-off-by Dario Faggioli <[email protected]>
Quoted 14 lines
---
Cc: George Dunlap <[email protected]>
Cc: Andrew Cooper <[email protected]>
Cc: Aaron Cornelius <[email protected]>--- xen/common/schedule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)xen/common/schedule.c +0
-0
xen/common/schedule.c int schedule_cpu_switch(unsigned int cpu, struct cpupool *c) · line 1708
Quoted 8 lines
xen/common/schedule.c +1
-1@@ -1702,7 +1702,7 @@ int schedule_cpu_switch(unsigned int cpu, struct cpupool *c)* that the lock itself changed, and retry acquiring the new one (which * will be the correct, remapped one, at that point). */ - old_lock =pcpu_schedule_lock (cpu); + old_lock =pcpu_schedule_lock_irq (cpu); vpriv_old = idle->sched_priv; ppriv_old =per_cpu (schedule_data, cpu).sched_priv;
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 8 lines · George Dunlap
Quoted 7 lines · Dario Faggioli
Commit
94734ab7c3f5("xen: sched: close potential races when switching scheduler to CPUs") buggily replaced a call topcpu_schedule_lock_irq()with justpcpu_schedule_lock(), causing the relevantirq_safevs. non-irq_safeASSERT()incheck_lock()to trigger.
Quoted 5 lines
Quoted 3 lines
Fix that.
Signed-off-by Dario Faggioli <[email protected]>Acked-by George Dunlap <[email protected]>
Thanks George.
Sorry again for the issue, and sorry if it did take longer.
I said "Monday morning", but this morning my test box was otherwise busy, and this time, I really wanted to make sure I tested this on a debug build! :-P
Dario
Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 9 lines · Dario Faggioli
Quoted 8 lines · George Dunlap
Quoted 7 lines · Dario Faggioli
Commit
94734ab7c3f5("xen: sched: close potential races when switching scheduler to CPUs") buggily replaced a call topcpu_schedule_lock_irq()with justpcpu_schedule_lock(), causing the relevantirq_safevs. non-irq_safeASSERT()incheck_lock()to trigger.
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
Fix that.
Signed-off-by Dario Faggioli <[email protected]>Acked-by George Dunlap <[email protected]>Thanks George.
And applied.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel