This is a note to let you know that I've just added the patch titled
xen: close evtchn port if binding to irq fails
to the 3.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
xen-close-evtchn-port-if-binding-to-irq-fails.patch
and it can be found in the queue-3.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From e7e44e444876478d50630f57b0c31d29f6725020 Mon Sep 17 00:00:00 2001
From: Wei Liu <[email protected]>
Date: Mon, 18 Feb 2013 14:57:58 +0000
Subject: xen: close evtchn port if binding to irq fails
From: Wei Liu <[email protected]>
commit e7e44e444876478d50630f57b0c31d29f6725020 upstream.
Signed-off-by: Wei Liu <[email protected]>
Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/xen/evtchn.c | 10 ++++++++++
1 file changed, 10 insertions(+)
--- a/drivers/xen/evtchn.c
+++ b/drivers/xen/evtchn.c
@@ -269,6 +269,14 @@ static int evtchn_bind_to_user(struct pe
u->name, (void *)(unsigned long)port);
if (rc >= 0)
rc = evtchn_make_refcounted(port);
+ else {
+ /* bind failed, should close the port now */
+ struct evtchn_close close;
+ close.port = port;
+ if (HYPERVISOR_event_channel_op(EVTCHNOP_close, &close) != 0)
+ BUG();
+ set_port_user(port, NULL);
+ }
return rc;
}
@@ -277,6 +285,8 @@ static void evtchn_unbind_from_user(stru
{
int irq = irq_from_evtchn(port);
+ BUG_ON(irq < 0);
+
unbind_from_irqhandler(irq, (void *)(unsigned long)port);
set_port_user(port, NULL);
Patches currently in stable-queue which might be from [email protected] are
queue-3.4/xen-close-evtchn-port-if-binding-to-irq-fails.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html