diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2021-03-19 14:58:36 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-03-20 18:54:57 +0000 |
commit | 0ffb5a8a49ba2e0438f46d1083f7a58d088bc153 (patch) | |
tree | 9faaf30bf7817befc1d17a0d97c2714af4129469 /meta/recipes-kernel/lttng/lttng-modules/0004-Fix-kretprobe-null-ptr-deref-on-session-destroy.patch | |
parent | b020c230c9ddfaa2901fa07df70e4854677e19a7 (diff) | |
download | poky-0ffb5a8a49ba2e0438f46d1083f7a58d088bc153.tar.gz |
lttng-modules: backport patches to fix build against 5.12+ kernel
There are four changes in addition to the 2.12.5 release that we
need to build against the 5.12 kernel. Rather than only rely on
people knowing to use devupstream support to build against newer
kernels, we backport the 4 patches while waiting for release.
(From OE-Core rev: 2d45c09bfbad969549c719654f72714324299f00)
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/lttng/lttng-modules/0004-Fix-kretprobe-null-ptr-deref-on-session-destroy.patch')
-rw-r--r-- | meta/recipes-kernel/lttng/lttng-modules/0004-Fix-kretprobe-null-ptr-deref-on-session-destroy.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0004-Fix-kretprobe-null-ptr-deref-on-session-destroy.patch b/meta/recipes-kernel/lttng/lttng-modules/0004-Fix-kretprobe-null-ptr-deref-on-session-destroy.patch new file mode 100644 index 0000000000..8a839c2b43 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/0004-Fix-kretprobe-null-ptr-deref-on-session-destroy.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 92cc3e7f76a545a2cd4828576971f1eea83f4e68 Mon Sep 17 00:00:00 2001 | ||
2 | From: Francis Deslauriers <francis.deslauriers@efficios.com> | ||
3 | Date: Wed, 17 Mar 2021 10:40:56 -0400 | ||
4 | Subject: [PATCH 4/4] Fix: kretprobe: null ptr deref on session destroy | ||
5 | |||
6 | The `filter_bytecode_runtime_head` list is currently not initialized for | ||
7 | the return event of the kretprobe. This caused a kernel null ptr | ||
8 | dereference when destroying a session. It can reproduced with the | ||
9 | following commands: | ||
10 | |||
11 | lttng create | ||
12 | lttng enable-event -k --function=lttng_test_filter_event_write my_event | ||
13 | lttng start | ||
14 | lttng stop | ||
15 | lttng destroy | ||
16 | |||
17 | Upstream-status: backport | ||
18 | |||
19 | Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com> | ||
20 | Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
21 | Change-Id: I1162ce8b10dd7237a26331531f048346b984eee7 | ||
22 | --- | ||
23 | lttng-events.c | 2 ++ | ||
24 | 1 file changed, 2 insertions(+) | ||
25 | |||
26 | diff --git a/lttng-events.c b/lttng-events.c | ||
27 | index 984bd341..3450fa40 100644 | ||
28 | --- a/lttng-events.c | ||
29 | +++ b/lttng-events.c | ||
30 | @@ -704,6 +704,8 @@ struct lttng_event *_lttng_event_create(struct lttng_channel *chan, | ||
31 | event_return->enabled = 0; | ||
32 | event_return->registered = 1; | ||
33 | event_return->instrumentation = itype; | ||
34 | + INIT_LIST_HEAD(&event_return->bytecode_runtime_head); | ||
35 | + INIT_LIST_HEAD(&event_return->enablers_ref_head); | ||
36 | /* | ||
37 | * Populate lttng_event structure before kretprobe registration. | ||
38 | */ | ||
39 | -- | ||
40 | 2.19.1 | ||
41 | |||