From b585b4dfa76737c797d6a981eacc99eb54551331 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Thu, 8 May 2008 11:53:39 +0100 Subject: 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 --- extras/mini-os/events.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'extras/mini-os/events.c') 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; } -- cgit v1.2.3