diff options
author | Hongxu Jia <hongxu.jia@windriver.com> | 2017-07-05 05:13:17 -0400 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-07-14 23:44:30 +0200 |
commit | 1acfde8120eaa290df64f709e5a322bd6a44d19c (patch) | |
tree | 13d387707da99934f98ba276efe497f0d8c40388 /meta-oe/recipes-support/multipath-tools/files/0011-multipathd-fix-show-maps-json-crash.patch | |
parent | 5688c8e24cf106f8248ea44e98ba15931844ed9b (diff) | |
download | meta-openembedded-1acfde8120eaa290df64f709e5a322bd6a44d19c.tar.gz |
multipath-tools: 0.6.4 -> 0.7.1
1. In fedora/redhat, it is renamed to device-mapper-multipath,
use PROVIDE and RPROVIDE to support.
2. Split ${PN}-libs
3. Add multipath.conf.example
4. Backport patches from fedora:
git://pkgs.fedoraproject.org/rpms/device-mapper-multipath
- 0001 ~ 0011
5. Rebase local patches:
- makefile_inc.patch -> 0012-multipath-tools-modify-Makefile.inc-for-cross-compil.patch
- always-use-libdevmapper.patch -> 0013-Always-use-devmapper.patch
- always-use-libdevmapper-kpartx.patch -> 0014-Always-use-devmapper-for-kpartx.patch
6. Drop obsolete patches:
- 0001-multipathd.service-Error-fix.patch
- shared-libs-avoid-linking-.so-as-executable.patch
- checkers-disable-libcheckrbd.so.patch
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/multipath-tools/files/0011-multipathd-fix-show-maps-json-crash.patch')
-rw-r--r-- | meta-oe/recipes-support/multipath-tools/files/0011-multipathd-fix-show-maps-json-crash.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/multipath-tools/files/0011-multipathd-fix-show-maps-json-crash.patch b/meta-oe/recipes-support/multipath-tools/files/0011-multipathd-fix-show-maps-json-crash.patch new file mode 100644 index 0000000000..12d6d38a78 --- /dev/null +++ b/meta-oe/recipes-support/multipath-tools/files/0011-multipathd-fix-show-maps-json-crash.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From bc3ceda747104afdc24386df5dc45ca86f6c2936 Mon Sep 17 00:00:00 2001 | ||
2 | From: Benjamin Marzinski <bmarzins@redhat.com> | ||
3 | Date: Thu, 1 Jun 2017 17:52:28 -0500 | ||
4 | Subject: [PATCH 11/14] multipathd: fix "show maps json" crash | ||
5 | |||
6 | If there are no multipath devices, show_maps_json sets the maximum size | ||
7 | of the reply buffer to 0. Having a size of 0 causes the calls to calloc | ||
8 | and realloc to behave in ways that the code isn't designed to handle, | ||
9 | leading to a double-free crash. Instead, show_maps_json should just | ||
10 | use the INITIAL_REPLY_LEN if there are no multipath devices. | ||
11 | |||
12 | Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> | ||
13 | --- | ||
14 | multipathd/cli_handlers.c | 6 ++++-- | ||
15 | 1 file changed, 4 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c | ||
18 | index 04c7386..7b0d00c 100644 | ||
19 | --- a/multipathd/cli_handlers.c | ||
20 | +++ b/multipathd/cli_handlers.c | ||
21 | @@ -162,10 +162,12 @@ show_maps_json (char ** r, int * len, struct vectors * vecs) | ||
22 | struct multipath * mpp; | ||
23 | char * c; | ||
24 | char * reply; | ||
25 | - unsigned int maxlen = INITIAL_REPLY_LEN * | ||
26 | - PRINT_JSON_MULTIPLIER * VECTOR_SIZE(vecs->mpvec); | ||
27 | + unsigned int maxlen = INITIAL_REPLY_LEN; | ||
28 | int again = 1; | ||
29 | |||
30 | + if (VECTOR_SIZE(vecs->mpvec) > 0) | ||
31 | + maxlen *= PRINT_JSON_MULTIPLIER * VECTOR_SIZE(vecs->mpvec); | ||
32 | + | ||
33 | vector_foreach_slot(vecs->mpvec, mpp, i) { | ||
34 | if (update_multipath(vecs, mpp->alias, 0)) { | ||
35 | return 1; | ||
36 | -- | ||
37 | 2.8.1 | ||
38 | |||