[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-3.2-testing] Fix SCHEDOP_poll to avoid wakeup-waiting race on interrupt delivery.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1224179705 -3600
# Node ID 0d59015f505d52de9c176db4114fac4e1618b700
# Parent  dfbf481940bb48c891fe2988721a02db05bb7d29
Fix SCHEDOP_poll to avoid wakeup-waiting race on interrupt delivery.

Race found by Jan Beulich.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset:   18640:dc61548aa479
xen-unstable date:        Thu Oct 16 18:36:43 2008 +0100
---
 xen/common/schedule.c |    4 ++++
 1 files changed, 4 insertions(+)

diff -r dfbf481940bb -r 0d59015f505d xen/common/schedule.c
--- a/xen/common/schedule.c     Thu Oct 16 18:27:37 2008 +0100
+++ b/xen/common/schedule.c     Thu Oct 16 18:55:05 2008 +0100
@@ -354,6 +354,10 @@ static long do_poll(struct sched_poll *s
     /* Check for events /after/ setting flags: avoids wakeup waiting race. */
     smp_wmb();
 
+    rc = 0;
+    if ( local_events_need_delivery() )
+        goto out;
+
     for ( i = 0; i < sched_poll->nr_ports; i++ )
     {
         rc = -EFAULT;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.