diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2015-05-19 16:12:32 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-05-19 16:12:32 +0200 |
commit | c3b5d3cea508d2c8ff493ef18c45a9cc58fb7015 (patch) | |
tree | a80672ee82fcc3d9c8d486e53731eb19cd968eb0 /kernel/trace/trace_functions_graph.c | |
parent | daa67b4b70568a07fef3cffacb2055891bf42ddb (diff) | |
parent | e26081808edadfd257c6c9d81014e3b25e9a6118 (diff) | |
download | linux-c3b5d3cea508d2c8ff493ef18c45a9cc58fb7015.tar.bz2 |
Merge branch 'linus' into timers/core
Make sure the upstream fixes are applied before adding further
modifications.
Diffstat (limited to 'kernel/trace/trace_functions_graph.c')
-rw-r--r-- | kernel/trace/trace_functions_graph.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c index 9cfea4c6d314..a51e79688455 100644 --- a/kernel/trace/trace_functions_graph.c +++ b/kernel/trace/trace_functions_graph.c @@ -1308,15 +1308,19 @@ void graph_trace_open(struct trace_iterator *iter) { /* pid and depth on the last trace processed */ struct fgraph_data *data; + gfp_t gfpflags; int cpu; iter->private = NULL; - data = kzalloc(sizeof(*data), GFP_KERNEL); + /* We can be called in atomic context via ftrace_dump() */ + gfpflags = (in_atomic() || irqs_disabled()) ? GFP_ATOMIC : GFP_KERNEL; + + data = kzalloc(sizeof(*data), gfpflags); if (!data) goto out_err; - data->cpu_data = alloc_percpu(struct fgraph_cpu_data); + data->cpu_data = alloc_percpu_gfp(struct fgraph_cpu_data, gfpflags); if (!data->cpu_data) goto out_err_free; |