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/
Home Products Support Community News


[Xen-changelog] [xen-3.1-testing] Avoid using a separate watch thread du

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.1-testing] Avoid using a separate watch thread due to uninitialised watch->flags.
From: "Xen patchbot-3.1-testing" <patchbot-3.1-testing@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 03 Mar 2008 10:10:25 -0800
Delivery-date: Mon, 03 Mar 2008 10:10:28 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1204363630 0
# Node ID 347ccfd94d491ada99445a5432b730dcba4f265d
# Parent  215fb8f1f8107131936cf31d69e5b299186a3f83
Avoid using a separate watch thread due to uninitialised watch->flags.

The xenbus_dev code isn't setup to handle the case where
XBWF_new_thread is set so there is a potetial crash if this flag is
erroneously set. Therefore initialise flags to zero by using kzalloc
rather than kmalloc.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
linux-2.6.18-xen changeset:   440:43de9d7c3c63adaac7e334621f763c94acbbc178
linux-2.6.18-xen date:        Tue Feb 26 17:59:18 2008 +0000
 linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 215fb8f1f810 -r 347ccfd94d49 
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c      Tue Feb 26 
15:06:42 2008 +0000
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c      Sat Mar 01 
09:27:10 2008 +0000
@@ -278,7 +278,7 @@ static ssize_t xenbus_dev_write(struct f
                if (msg_type == XS_WATCH) {
-                       watch = kmalloc(sizeof(*watch), GFP_KERNEL);
+                       watch = kzalloc(sizeof(*watch), GFP_KERNEL);
                        watch->watch.node = kmalloc(strlen(path)+1,
                        strcpy((char *)watch->watch.node, path);

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.1-testing] Avoid using a separate watch thread due to uninitialised watch->flags., Xen patchbot-3.1-testing <=