[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [RFC PATCH V5 02/15] evtchn: reset bucket if xsm_alloc_security_evtchn fails



If xsm_alloc_security_evtchn fails, the evtchn bucket will be freed. We also
need to reset pointer in bucket array to NULL.

Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 xen/common/event_channel.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c
index dabfa9e..1b702d5 100644
--- a/xen/common/event_channel.c
+++ b/xen/common/event_channel.c
@@ -149,6 +149,7 @@ static int get_free_port(struct domain *d)
             for ( j = 0; j < i; j++ )
                 xsm_free_security_evtchn(&chn[j]);
             xfree(chn);
+            bucket_from_port(d, port) = NULL;
             return -ENOMEM;
         }
     }
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.