From: Keir Fraser Date: Thu, 8 May 2008 10:53:39 +0000 (+0100) Subject: minios: clear the event before calling the handler since (especially X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14215^2~47 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b585b4dfa76737c797d6a981eacc99eb54551331;p=xen.git minios: clear the event before calling the handler since (especially in the SMP case) the handler may make another domain send an event again, and that must not be lost. Signed-off-by: Samuel Thibault --- diff --git a/extras/mini-os/events.c b/extras/mini-os/events.c index 51a3cc24f0..f47fc38822 100644 --- a/extras/mini-os/events.c +++ b/extras/mini-os/events.c @@ -58,9 +58,12 @@ void unbind_all_ports(void) int do_event(evtchn_port_t port, struct pt_regs *regs) { ev_action_t *action; + + clear_evtchn(port); + if (port >= NR_EVS) { printk("Port number too large: %d\n", port); - goto out; + return 1; } action = &ev_actions[port]; @@ -69,9 +72,6 @@ int do_event(evtchn_port_t port, struct pt_regs *regs) /* call the handler */ action->handler(port, regs, action->data); - out: - clear_evtchn(port); - return 1; }