[Pkg-libvirt-commits] [SCM] Libvirt Debian packaging branch, experimental, updated. debian/0.7.4-2
Guido Günther
agx at sigxcpu.org
Mon Dec 7 20:46:37 UTC 2009
The following commit has been merged in the experimental branch:
commit e5ae24b16024b5d8d760542938efd4ab195d592d
Author: Guido Günther <agx at sigxcpu.org>
Date: Mon Dec 7 19:17:21 2009 +0100
Fix on udev backend startup
diff --git a/debian/patches/0005-udev_device_get_devpath-might-return-NULL.patch b/debian/patches/0005-udev_device_get_devpath-might-return-NULL.patch
new file mode 100644
index 0000000..044567e
--- /dev/null
+++ b/debian/patches/0005-udev_device_get_devpath-might-return-NULL.patch
@@ -0,0 +1,30 @@
+From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx at sigxcpu.org>
+Date: Mon, 7 Dec 2009 19:00:11 +0100
+Subject: [PATCH] udev_device_get_devpath might return NULL
+
+Fix crash on strdup in that case.
+---
+ src/node_device/node_device_udev.c | 8 +++++++-
+ 1 files changed, 7 insertions(+), 1 deletions(-)
+
+diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
+index 9b48052..c7238fc 100644
+--- a/src/node_device/node_device_udev.c
++++ b/src/node_device/node_device_udev.c
+@@ -947,8 +947,14 @@ static int udevProcessStorage(struct udev_device *device,
+ {
+ union _virNodeDevCapData *data = &def->caps->data;
+ int ret = -1;
++ const char* devnode;
+
+- data->storage.block = strdup(udev_device_get_devnode(device));
++ devnode = udev_device_get_devnode(device);
++ if(!devnode) {
++ VIR_DEBUG("No devnode for '%s'\n", udev_device_get_devpath(device));
++ goto out;
++ }
++ data->storage.block = strdup(devnode);
+ if (udevGetStringProperty(device,
+ "DEVNAME",
+ &data->storage.block) == PROPERTY_ERROR) {
+--
diff --git a/debian/patches/series b/debian/patches/series
index a8c0f9e..7290eac 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
0002-qemu-disable-network.diff.patch
0003-allow-libvirt-group-to-access-the-socket.patch
0004-fix-Debian-specific-path-to-hvm-loader.patch
+0005-udev_device_get_devpath-might-return-NULL.patch
--
Libvirt Debian packaging
More information about the Pkg-libvirt-commits
mailing list