diff options
author | Roy Li <rongqing.li@windriver.com> | 2015-06-16 10:50:04 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-23 11:38:14 +0100 |
commit | 8152bcadba8581f75822b75e13c2a43dd6464cd3 (patch) | |
tree | 3f450ee9606739d7754a25d8394e091ffc13e988 /meta/recipes-kernel/lttng | |
parent | 1eaca01b652a9fa51fe3ec1db4edcd48778ad7c8 (diff) | |
download | openembedded-core-8152bcadba8581f75822b75e13c2a43dd6464cd3.tar.gz openembedded-core-8152bcadba8581f75822b75e13c2a43dd6464cd3.tar.bz2 openembedded-core-8152bcadba8581f75822b75e13c2a43dd6464cd3.zip |
babeltrace: Fix invalid pointer free with trace collection
This fixed the bug https://bugs.lttng.org/issues/790
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-kernel/lttng')
-rw-r--r-- | meta/recipes-kernel/lttng/babeltrace/0001-Fix-invalid-pointer-free-with-trace-collection.patch | 44 | ||||
-rw-r--r-- | meta/recipes-kernel/lttng/babeltrace_1.2.4.bb | 4 |
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 @@ +From e4cad900994cf286d971796a947fea782dfc6651 Mon Sep 17 00:00:00 2001 +From: Francis Giraldeau <francis.giraldeau@gmail.com> +Date: Mon, 15 Jun 2015 11:43:02 -0400 +Subject: [PATCH] Fix invalid pointer free with trace collection + +Upstream-Status: Submitted + +Patch proposed by Li RongQing related to bug# 790 + +Signed-off-by: Mikael Beckius <mikael.beckius@windriver.com> +Signed-off-by: Francis Giraldeau <francis.giraldeau@gmail.com> +--- + lib/context.c | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/lib/context.c b/lib/context.c +index 45aab34..8d3770f 100644 +--- a/lib/context.c ++++ b/lib/context.c +@@ -79,7 +79,7 @@ int bt_context_add_trace(struct bt_context *ctx, const char *path, + struct bt_trace_descriptor *td; + struct bt_format *fmt; + struct bt_trace_handle *handle; +- int ret, closeret; ++ int ret; + + if (!ctx || !format_name || (!path && !stream_list)) + return -EINVAL; +@@ -159,10 +159,8 @@ int bt_context_add_trace(struct bt_context *ctx, const char *path, + return handle->id; + + error: +- closeret = fmt->close_trace(td); +- if (closeret) { +- fprintf(stderr, "Error in close_trace callback\n"); +- } ++ if (handle) ++ bt_context_remove_trace(ctx, handle->id); + end: + return ret; + } +-- +1.9.1 + 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" SRCREV = "90395824efc007de88787a6b8e400a07c980be1c" PV = "1.2.4+git${SRCPV}" -SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-1.2" +SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-1.2 \ + file://0001-Fix-invalid-pointer-free-with-trace-collection.patch \ +" S = "${WORKDIR}/git" |