ia64/xen-unstable
changeset 18647:dc61548aa479
Fix SCHEDOP_poll to avoid wakeup-waiting race on interrupt delivery.
Race found by Jan Beulich.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Race found by Jan Beulich.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Thu Oct 16 18:36:43 2008 +0100 (2008-10-16) |
parents | bb1a67a7db26 |
children | 6bf61b830153 |
files | xen/common/schedule.c |
line diff
1.1 --- a/xen/common/schedule.c Thu Oct 16 15:46:04 2008 +0100 1.2 +++ b/xen/common/schedule.c Thu Oct 16 18:36:43 2008 +0100 1.3 @@ -455,6 +455,10 @@ static long do_poll(struct sched_poll *s 1.4 goto out; 1.5 #endif 1.6 1.7 + rc = 0; 1.8 + if ( local_events_need_delivery() ) 1.9 + goto out; 1.10 + 1.11 for ( i = 0; i < sched_poll->nr_ports; i++ ) 1.12 { 1.13 rc = -EFAULT;