summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRoy Li <rongqing.li@windriver.com>2015-06-16 10:50:04 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-23 11:47:20 +0100
commitb8d8d1dcd69aa0c2ff86369a65379f5cf2373346 (patch)
tree809e15fa1fa596051a3f24eff3bc1e56292ddcc9 /meta
parentf3a1bec3363ad7f785a5d24f8cb5f49eb0241b41 (diff)
downloadpoky-b8d8d1dcd69aa0c2ff86369a65379f5cf2373346.tar.gz
babeltrace: Fix invalid pointer free with trace collection
This fixed the bug https://bugs.lttng.org/issues/790 (From OE-Core rev: 8152bcadba8581f75822b75e13c2a43dd6464cd3) Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-kernel/lttng/babeltrace/0001-Fix-invalid-pointer-free-with-trace-collection.patch44
-rw-r--r--meta/recipes-kernel/lttng/babeltrace_1.2.4.bb4
2 files changed, 47 insertions, 1 deletions
diff --git a/meta/recipes-kernel/lttng/babeltrace/0001-Fix-invalid-pointer-free-with-trace-collection.patch b/meta/recipes-kernel/lttng/babeltrace/0001-Fix-invalid-pointer-free-with-trace-collection.patch
new file mode 100644
index 0000000000..3e2c4e1e68
--- /dev/null
+++ b/meta/recipes-kernel/lttng/babeltrace/0001-Fix-invalid-pointer-free-with-trace-collection.patch
@@ -0,0 +1,44 @@
1From e4cad900994cf286d971796a947fea782dfc6651 Mon Sep 17 00:00:00 2001
2From: Francis Giraldeau <francis.giraldeau@gmail.com>
3Date: Mon, 15 Jun 2015 11:43:02 -0400
4Subject: [PATCH] Fix invalid pointer free with trace collection
5
6Upstream-Status: Submitted
7
8Patch proposed by Li RongQing related to bug# 790
9
10Signed-off-by: Mikael Beckius <mikael.beckius@windriver.com>
11Signed-off-by: Francis Giraldeau <francis.giraldeau@gmail.com>
12---
13 lib/context.c | 8 +++-----
14 1 file changed, 3 insertions(+), 5 deletions(-)
15
16diff --git a/lib/context.c b/lib/context.c
17index 45aab34..8d3770f 100644
18--- a/lib/context.c
19+++ b/lib/context.c
20@@ -79,7 +79,7 @@ int bt_context_add_trace(struct bt_context *ctx, const char *path,
21 struct bt_trace_descriptor *td;
22 struct bt_format *fmt;
23 struct bt_trace_handle *handle;
24- int ret, closeret;
25+ int ret;
26
27 if (!ctx || !format_name || (!path && !stream_list))
28 return -EINVAL;
29@@ -159,10 +159,8 @@ int bt_context_add_trace(struct bt_context *ctx, const char *path,
30 return handle->id;
31
32 error:
33- closeret = fmt->close_trace(td);
34- if (closeret) {
35- fprintf(stderr, "Error in close_trace callback\n");
36- }
37+ if (handle)
38+ bt_context_remove_trace(ctx, handle->id);
39 end:
40 return ret;
41 }
42--
431.9.1
44
diff --git a/meta/recipes-kernel/lttng/babeltrace_1.2.4.bb b/meta/recipes-kernel/lttng/babeltrace_1.2.4.bb
index f616146393..536be41e3d 100644
--- a/meta/recipes-kernel/lttng/babeltrace_1.2.4.bb
+++ b/meta/recipes-kernel/lttng/babeltrace_1.2.4.bb
@@ -13,7 +13,9 @@ DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
13SRCREV = "90395824efc007de88787a6b8e400a07c980be1c" 13SRCREV = "90395824efc007de88787a6b8e400a07c980be1c"
14PV = "1.2.4+git${SRCPV}" 14PV = "1.2.4+git${SRCPV}"
15 15
16SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-1.2" 16SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-1.2 \
17 file://0001-Fix-invalid-pointer-free-with-trace-collection.patch \
18"
17 19
18S = "${WORKDIR}/git" 20S = "${WORKDIR}/git"
19 21