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] [linux-2.6.18-xen] Avoid using a separate watch thread d

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] Avoid using a separate watch thread due to uninitialised watch->flags.
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 26 Feb 2008 18:10:21 -0800
Delivery-date: Tue, 26 Feb 2008 18:10:25 -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 Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1204048758 0
# Node ID 43de9d7c3c63adaac7e334621f763c94acbbc178
# Parent  1edfea26a2a9d1b482f774fbf4cd113e7651ce3a
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>
 drivers/xen/xenbus/xenbus_dev.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 1edfea26a2a9 -r 43de9d7c3c63 drivers/xen/xenbus/xenbus_dev.c
--- a/drivers/xen/xenbus/xenbus_dev.c   Mon Feb 25 09:15:12 2008 +0000
+++ b/drivers/xen/xenbus/xenbus_dev.c   Tue Feb 26 17:59:18 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] [linux-2.6.18-xen] Avoid using a separate watch thread due to uninitialised watch->flags., Xen patchbot-linux-2.6.18-xen <=