summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/pv/xen.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pv/xen.c b/sys/dev/pv/xen.c
index 1257b2a9a9e..16fcee3d48b 100644
--- a/sys/dev/pv/xen.c
+++ b/sys/dev/pv/xen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xen.c,v 1.94 2019/12/13 02:16:53 mikeb Exp $ */
+/* $OpenBSD: xen.c,v 1.95 2020/02/13 15:39:02 mikeb Exp $ */
/*
* Copyright (c) 2015, 2016, 2017 Mike Belopuhov
@@ -704,7 +704,8 @@ xen_intr(void)
}
xi->xi_evcnt.ec_count++;
xen_intr_mask_acquired(sc, xi);
- task_add(xi->xi_taskq, &xi->xi_task);
+ if (!task_add(xi->xi_taskq, &xi->xi_task))
+ xen_intsrc_release(sc, xi);
}
}
}
@@ -716,6 +717,7 @@ xen_intr_schedule(xen_intr_handle_t xih)
struct xen_intsrc *xi;
if ((xi = xen_intsrc_acquire(sc, (evtchn_port_t)xih)) != NULL) {
+ xen_intr_mask_acquired(sc, xi);
if (!task_add(xi->xi_taskq, &xi->xi_task))
xen_intsrc_release(sc, xi);
}