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@citrix.com>
linux-2.6.18-xen changeset: 440:
43de9d7c3c63adaac7e334621f763c94acbbc178
linux-2.6.18-xen date: Tue Feb 26 17:59:18 2008 +0000
token++;
if (msg_type == XS_WATCH) {
- watch = kmalloc(sizeof(*watch), GFP_KERNEL);
+ watch = kzalloc(sizeof(*watch), GFP_KERNEL);
watch->watch.node = kmalloc(strlen(path)+1,
GFP_KERNEL);
strcpy((char *)watch->watch.node, path);