r465 - multipath-tools/trunk/debian/patches

Guido Guenther agx at alioth.debian.org
Sat Jun 9 15:59:31 UTC 2007


Author: agx
Date: Sat Jun  9 15:59:31 2007
New Revision: 465

Log:
multipathd: don't segfault on disappearing paths


Added:
   multipath-tools/trunk/debian/patches/fix-segfault-on-disappearing-paths.diff
Modified:
   multipath-tools/trunk/debian/patches/series

Added: multipath-tools/trunk/debian/patches/fix-segfault-on-disappearing-paths.diff
==============================================================================
--- (empty file)
+++ multipath-tools/trunk/debian/patches/fix-segfault-on-disappearing-paths.diff	Sat Jun  9 15:59:31 2007
@@ -0,0 +1,39 @@
+From dec3a69f2b43c44b84d0098d9f42b8207af46540 Mon Sep 17 00:00:00 2001
+From: Guido Guenther <agx at sigxcpu.org>
+Date: Sat, 9 Jun 2007 17:07:20 +0200
+Subject: [PATCH] Fix segfault on disappearing paths
+
+The path might already be gone when we process the udev event, in this case
+sysfs_device_get return NULL:
+
+Jun 09 16:56:06 | ID_FS_LABEL=
+Jun 09 16:56:06 | ID_FS_LABEL_SAFE=
+Jun 09 16:56:06 | DEVLINKS=/dev/disk/by-id/scsi-1494554000000000000000000000000010000069d0000000d /dev/disk/by-path/ip-10.0.0.3:3260-iscsi-iqn.2006-12.nix.rs45:storage.disk1-lun-0 /dev/disk/by-uuid/c8db60a3-7795-45cd-8369-a0f9ee876032
+Jun 09 16:56:06 | DEVNAME=/dev/sda
+/block/sda
+open '/block/sda'
+stat '/sys/block/sda' failed: No such file or directory
+Segmentation fault (core dumped)
+
+Signed-off-by: Guido Guenther <agx at sigxcpu.org>
+---
+ multipathd/main.c |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/multipathd/main.c b/multipathd/main.c
+index a173da3..c432331 100644
+--- a/multipathd/main.c
++++ b/multipathd/main.c
+@@ -635,6 +635,9 @@ uev_trigger (struct uevent * uev, void * trigger_data)
+ 		return 0;
+ 
+ 	sysdev = sysfs_device_get(uev->devpath);
++	if(!sysdev)
++		return 0;	
++
+ 	lock(vecs->lock);
+ 
+ 	/*
+-- 
+1.5.2.1
+

Modified: multipath-tools/trunk/debian/patches/series
==============================================================================
--- multipath-tools/trunk/debian/patches/series	(original)
+++ multipath-tools/trunk/debian/patches/series	Sat Jun  9 15:59:31 2007
@@ -1,4 +1,5 @@
 git-178b93111d54828a89ad280c0aaaea0812343a6a.diff
+fix-segfault-on-disappearing-paths.diff
 exclude-quilt.diff
 scsi_id.diff
 Makefile-cleanups.diff



More information about the pkg-lvm-commits mailing list