WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH / 4.0.1] fix fd leak in xenstore

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH / 4.0.1] fix fd leak in xenstore
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Tue, 14 Sep 2010 16:37:32 +0200
Delivery-date: Tue, 14 Sep 2010 07:40:19 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1284475054; l=608; s=domk; d=aepfle.de; h=Content-Type:MIME-Version:Subject:To:From:Date:X-RZG-CLASS-ID: X-RZG-AUTH; bh=HzsdFa7y/6fN1TRTzKQCMrmnJsU=; b=LEGfQaxT1Q48CMT5SRKIj3k1sJwZRketxR0Zj3yM0VVKBtudXNLOHOWlWHUsEPGY9E8 iv+O699RjN4+NQPK9NeSJKiLQeLnyVRQfjMXfYXFCzgcji6crMVtlCYMIAS86S/HYBsrx CFl5OUt6n89ZTH5Lp7oLFLhmeVslA0jgHGc=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
Missing from commit 'libxl: Backported stuff from unstable'
Without this change, xs_daemon_open/xs_daemon_close will leak filedescriptors.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

---
 tools/xenstore/xs.c |    2 ++
 1 file changed, 2 insertions(+)

--- xen-4.0.1-testing.orig/tools/xenstore/xs.c
+++ xen-4.0.1-testing/tools/xenstore/xs.c
@@ -285,6 +285,8 @@ void xs_daemon_close(struct xs_handle *h
        mutex_unlock(&h->request_mutex);
        mutex_unlock(&h->reply_mutex);
        mutex_unlock(&h->watch_mutex);
+
+       close_fds_free(h);
 }
 
 static bool read_all(int fd, void *data, unsigned int len)

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>