From: Wei Liu Subject: [RFC PATCH V5 02/15] evtchn: reset bucket if xsm_alloc_security_evtchn fails Date: Tue, 19 Mar 2013 15:15:27 +0000 Message-ID: <1363706140-26989-3-git-send-email-wei.liu2@citrix.com> References: <1363706140-26989-1-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1363706140-26989-1-git-send-email-wei.liu2@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Wei Liu , david.vrabel@citrix.com, jbeulich@suse.com, ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org 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 --- 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