diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-kernel/systemtap/systemtap/0001-Fix-BZ1285348-by-updating-systemtap-s-memory-flag-us.patch | 73 | ||||
-rw-r--r-- | meta/recipes-kernel/systemtap/systemtap_git.inc | 1 |
2 files changed, 74 insertions, 0 deletions
diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-Fix-BZ1285348-by-updating-systemtap-s-memory-flag-us.patch b/meta/recipes-kernel/systemtap/systemtap/0001-Fix-BZ1285348-by-updating-systemtap-s-memory-flag-us.patch new file mode 100644 index 0000000000..4c34d7762b --- /dev/null +++ b/meta/recipes-kernel/systemtap/systemtap/0001-Fix-BZ1285348-by-updating-systemtap-s-memory-flag-us.patch | |||
@@ -0,0 +1,73 @@ | |||
1 | From 3d010295efd215cf83a7d07eecf89137973c154a Mon Sep 17 00:00:00 2001 | ||
2 | Message-Id: <3d010295efd215cf83a7d07eecf89137973c154a.1467836241.git.tom.zanussi@linux.intel.com> | ||
3 | From: Jesper Brouer <jbrouer@redhat.com> | ||
4 | Date: Mon, 30 Nov 2015 11:24:29 -0600 | ||
5 | Subject: [PATCH] Fix BZ1285348 by updating systemtap's memory flag usage. | ||
6 | |||
7 | * runtime/linux/runtime_defines.h: Make sure __GFP_WAIT is defined. | ||
8 | * runtime/stp_utrace.c (utrace_task_alloc): Change GFP_IOFS to | ||
9 | STP_ALLOC_FLAGS. | ||
10 | (utrace_attach_task): Ditto. | ||
11 | |||
12 | Upstream-Status: Backport | ||
13 | |||
14 | Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> | ||
15 | --- | ||
16 | runtime/linux/runtime_defines.h | 23 +++++++++++++++++++++++ | ||
17 | runtime/stp_utrace.c | 5 +++-- | ||
18 | 2 files changed, 26 insertions(+), 2 deletions(-) | ||
19 | |||
20 | diff --git a/runtime/linux/runtime_defines.h b/runtime/linux/runtime_defines.h | ||
21 | index e69de29..6b44e0d 100644 | ||
22 | --- a/runtime/linux/runtime_defines.h | ||
23 | +++ b/runtime/linux/runtime_defines.h | ||
24 | @@ -0,0 +1,23 @@ | ||
25 | +// The following kernel commit renamed __GFP_WAIT to __GRP_RECLAIM: | ||
26 | +// | ||
27 | +// commit 71baba4b92dc1fa1bc461742c6ab1942ec6034e9 | ||
28 | +// Author: Mel Gorman <mgorman@techsingularity.net> | ||
29 | +// Date: Fri Nov 6 16:28:28 2015 -0800 | ||
30 | +// | ||
31 | +// mm, page_alloc: rename __GFP_WAIT to __GFP_RECLAIM | ||
32 | +// | ||
33 | +// __GFP_WAIT was used to signal that the caller was in atomic | ||
34 | +// context and could not sleep. Now it is possible to | ||
35 | +// distinguish between true atomic context and callers that are | ||
36 | +// not willing to sleep. The latter should clear | ||
37 | +// __GFP_DIRECT_RECLAIM so kswapd will still wake. As clearing | ||
38 | +// __GFP_WAIT behaves differently, there is a risk that people | ||
39 | +// will clear the wrong flags. This patch renames __GFP_WAIT to | ||
40 | +// __GFP_RECLAIM to clearly indicate what it does -- setting it | ||
41 | +// allows all reclaim activity, clearing them prevents it. | ||
42 | +// | ||
43 | +// Handle the rename by defining __GFP_WAIT as __GFP_RECLAIM. | ||
44 | +#include <linux/gfp.h> | ||
45 | +#ifndef __GFP_WAIT | ||
46 | +#define __GFP_WAIT __GFP_RECLAIM | ||
47 | +#endif | ||
48 | diff --git a/runtime/stp_utrace.c b/runtime/stp_utrace.c | ||
49 | index c69dec1..a8afc0d 100644 | ||
50 | --- a/runtime/stp_utrace.c | ||
51 | +++ b/runtime/stp_utrace.c | ||
52 | @@ -511,7 +511,8 @@ static struct utrace *__task_utrace_struct(struct task_struct *task) | ||
53 | */ | ||
54 | static bool utrace_task_alloc(struct task_struct *task) | ||
55 | { | ||
56 | - struct utrace *utrace = kmem_cache_zalloc(utrace_cachep, GFP_IOFS); | ||
57 | + struct utrace *utrace = kmem_cache_zalloc(utrace_cachep, | ||
58 | + STP_ALLOC_FLAGS); | ||
59 | struct utrace *u; | ||
60 | |||
61 | if (unlikely(!utrace)) | ||
62 | @@ -782,7 +783,7 @@ static struct utrace_engine *utrace_attach_task( | ||
63 | utrace = task_utrace_struct(target); | ||
64 | } | ||
65 | |||
66 | - engine = kmem_cache_alloc(utrace_engine_cachep, GFP_IOFS); | ||
67 | + engine = kmem_cache_alloc(utrace_engine_cachep, STP_ALLOC_FLAGS); | ||
68 | if (unlikely(!engine)) | ||
69 | return ERR_PTR(-ENOMEM); | ||
70 | |||
71 | -- | ||
72 | 2.5.0 | ||
73 | |||
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.inc b/meta/recipes-kernel/systemtap/systemtap_git.inc index 656f15f808..2ea98b2a56 100644 --- a/meta/recipes-kernel/systemtap/systemtap_git.inc +++ b/meta/recipes-kernel/systemtap/systemtap_git.inc | |||
@@ -9,6 +9,7 @@ SRC_URI = "git://sourceware.org/git/systemtap.git \ | |||
9 | file://system_map_location.patch \ | 9 | file://system_map_location.patch \ |
10 | file://configure-allow-to-disable-libvirt.patch \ | 10 | file://configure-allow-to-disable-libvirt.patch \ |
11 | file://x32_abi_time.patch \ | 11 | file://x32_abi_time.patch \ |
12 | file://0001-Fix-BZ1285348-by-updating-systemtap-s-memory-flag-us.patch \ | ||
12 | " | 13 | " |
13 | 14 | ||
14 | # systemtap doesn't support mips | 15 | # systemtap doesn't support mips |