Ubuntu Pastebin

Paste from caribou at Fri, 14 Oct 2016 16:23:52 +0000

Download as text
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
diff -Nru multipath-tools-0.4.9/debian/changelog multipath-tools-0.4.9/debian/changelog
--- multipath-tools-0.4.9/debian/changelog	2016-06-28 12:01:42.000000000 +0200
+++ multipath-tools-0.4.9/debian/changelog	2016-09-12 10:43:19.000000000 +0200
@@ -1,3 +1,20 @@
+multipath-tools (0.4.9-3ubuntu7.15) trusty; urgency=medium
+
+  * d/p/0047-Add-existing-multipath-devices-to-wwids-file-on.patch:
+    Fix multipathd which does not update /etc/multipath/wwids file
+    when reconfigure is invoked. (LP: #1621835)
+
+  [ Dragan Stancevic ]
+  * d/p/0048-multipathd-delay-free-pathvec.patch :
+    Fix SEGV on multipathd shutdown (LP: #1616213) 
+
+  [ Nishanth Aravamudan ]
+  * debian/patches/fix_use_after_free.patch: Fix use-after-free bugs.
+    Thanks to Christof Schmitt <christof.schmitt@de.ibm.com> and
+    Benjamin Marzinski <bmarzins@redhat.com>.  Closes LP:  #1628723.
+
+ -- Louis Bouchard <louis.bouchard@ubuntu.com>  Mon, 12 Sep 2016 10:43:19 +0200
+
 multipath-tools (0.4.9-3ubuntu7.14) trusty; urgency=medium
 
   * d/p/0045-fix-mpp_alias-freeing.patch, d/p/0046-revert-act_reload.patch:
diff -Nru multipath-tools-0.4.9/debian/patches/0047-Add-existing-multipath-devices-to-wwids-file-on.patch multipath-tools-0.4.9/debian/patches/0047-Add-existing-multipath-devices-to-wwids-file-on.patch
--- multipath-tools-0.4.9/debian/patches/0047-Add-existing-multipath-devices-to-wwids-file-on.patch	1970-01-01 01:00:00.000000000 +0100
+++ multipath-tools-0.4.9/debian/patches/0047-Add-existing-multipath-devices-to-wwids-file-on.patch	2016-09-12 10:43:19.000000000 +0200
@@ -0,0 +1,35 @@
+From 0245b3ac6e34dee1ab039bba71806bc35c286ab8 Mon Sep 17 00:00:00 2001
+From: Benjamin Marzinski <bmarzins@redhat.com>
+Date: Thu, 2 May 2013 16:46:30 -0500
+Subject: [PATCH] Add existing multipath devices to wwids file on
+
+When multipathd started up, it didn't add any existing devices to the
+wwids file.  Because of this, devices that were always set up in the
+initramfs were not counted as valid multipath devices, and checking
+if one of their paths was a multipath path device gave the incorrect
+answer.  This patch makes multipath add those devices when it does
+its initial configuration on startup.
+
+Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
+---
+ multipathd/main.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/multipathd/main.c
++++ b/multipathd/main.c
+@@ -58,6 +58,7 @@
+ #include "cli_handlers.h"
+ #include "lock.h"
+ #include "waiter.h"
++#include "wwids.h"
+ 
+ #define FILE_NAME_SIZE 256
+ #define CMDSIZE 160
+@@ -1241,6 +1242,7 @@
+ 		if (start_waiters)
+ 			if (start_waiter_thread(mpp, vecs))
+ 				return 1;
++		remember_wwid(mpp->wwid);
+ 	}
+ 	return 0;
+ }
diff -Nru multipath-tools-0.4.9/debian/patches/0048-multipathd-delay-free-pathvec.patch multipath-tools-0.4.9/debian/patches/0048-multipathd-delay-free-pathvec.patch
--- multipath-tools-0.4.9/debian/patches/0048-multipathd-delay-free-pathvec.patch	1970-01-01 01:00:00.000000000 +0100
+++ multipath-tools-0.4.9/debian/patches/0048-multipathd-delay-free-pathvec.patch	2016-09-12 10:43:19.000000000 +0200
@@ -0,0 +1,28 @@
+Description: Fix SEGV on multipathd shutdown
+Author: Dragan Stancevic <dragan.stancevic@canonical.com>
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/multipath-tools/+bug/1616213
+---
+--- a/multipathd/main.c
++++ b/multipathd/main.c
+@@ -1522,7 +1522,6 @@
+ 		vector_foreach_slot(vecs->mpvec, mpp, i)
+ 			dm_queue_if_no_path(mpp->alias, 0);
+ 	remove_maps_and_stop_waiters(vecs);
+-	free_pathvec(vecs->pathvec, FREE_PATHS);
+ 
+ 	pthread_cancel(check_thr);
+ 	pthread_cancel(uevent_thr);
+@@ -1541,6 +1540,13 @@
+ 		sleep (1); /* This is weak. */
+ 		condlog(3,"Have %d wait event checkers threads to de-alloc, waiting..\n", vecs->lock.depth);
+ 	}
++
++	lock(vecs->lock);
++	/* free pathvec after lock.depth is 0, check_thr is still using it before that */
++	free_pathvec(vecs->pathvec, FREE_PATHS);
++	vecs->pathvec = NULL;
++	unlock(vecs->lock);
++
+ 	pthread_mutex_destroy(vecs->lock.mutex);
+ 	FREE(vecs->lock.mutex);
+ 	vecs->lock.depth = 0;
diff -Nru multipath-tools-0.4.9/debian/patches/fix_use_after_free.patch multipath-tools-0.4.9/debian/patches/fix_use_after_free.patch
--- multipath-tools-0.4.9/debian/patches/fix_use_after_free.patch	1970-01-01 01:00:00.000000000 +0100
+++ multipath-tools-0.4.9/debian/patches/fix_use_after_free.patch	2016-09-12 10:43:19.000000000 +0200
@@ -0,0 +1,50 @@
+Description: Fix use-after-free bugs
+Author: Christof Schmitt <christof.schmitt@de.ibm.com>
+Author: Benjamin Marzinski <bmarzins@redhat.com>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1628723
+Origin: upstream, http://git.opensvc.com/gitweb.cgi?p=multipath-tools/.git;a=commit;h=828d2fbaab304d1ec7db2f563a59eaf2c7a516ea
+Origin: upstream, http://git.opensvc.com/gitweb.cgi?p=multipath-tools/.git;a=commit;h=cb0f7127ba90ab5e8e71fc534a0a16cdbe96a88f
+
+--- a/libmultipath/vector.c
++++ b/libmultipath/vector.c
+@@ -96,7 +96,7 @@
+ 		v->slot = NULL;
+ 	}
+ 	else
+-		v = REALLOC(v->slot, sizeof (void *) * v->allocated);
++		v->slot = REALLOC(v->slot, sizeof (void *) * v->allocated);
+ }
+ 
+ void
+--- a/libmultipath/discovery.c
++++ b/libmultipath/discovery.c
+@@ -229,11 +229,13 @@
+ 		const char *value;
+ 
+ 		value = udev_device_get_sysattr_value(tgtdev, "node_name");
+-		udev_device_unref(tgtdev);
+ 		if (value) {
+ 			strncpy(node, value, NODE_NAME_SIZE);
++			udev_device_unref(tgtdev);
+ 			return 0;
+ 		}
++		else
++			udev_device_unref(tgtdev);
+ 	}
+ 
+ 	/* Check for iSCSI */
+@@ -252,11 +254,13 @@
+ 			const char *value;
+ 
+ 			value = udev_device_get_sysattr_value(tgtdev, "targetname");
+-			udev_device_unref(tgtdev);
+ 			if (value) {
+ 				strncpy(node, value, NODE_NAME_SIZE);
++				udev_device_unref(tgtdev);
+ 				return 0;
+ 			}
++			else
++				udev_device_unref(tgtdev);
+ 		}
+ 	}
+ 	return 1;
diff -Nru multipath-tools-0.4.9/debian/patches/series multipath-tools-0.4.9/debian/patches/series
--- multipath-tools-0.4.9/debian/patches/series	2016-06-28 11:58:05.000000000 +0200
+++ multipath-tools-0.4.9/debian/patches/series	2016-09-12 10:43:19.000000000 +0200
@@ -80,3 +80,6 @@
 0001-multipath-fix-setting-sysfs-fc-timeout-parameters.patch
 0045-fix-mpp_alias-freeing.patch
 0046-revert-act_reload.patch
+0047-Add-existing-multipath-devices-to-wwids-file-on.patch
+0048-multipathd-delay-free-pathvec.patch
+fix_use_after_free.patch
Download as text