aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-05-22 22:40:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-22 22:40:39 -0400
commit7639dad93a5564579987abded4ec05e3db13659d (patch)
treed786a45e79672ee3ea04e93d60ec1da02cb17940 /kernel
parent77ed402b7f53cbe50ae8384a172a5b9713020400 (diff)
parent8329e818f14926a6040df86b2668568bde342ebf (diff)
Merge tag 'trace-v4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull motr tracing updates from Steven Rostedt: "Three more changes. - I forgot that I had another selftest to stress test the ftrace instance creation. It was actually suppose to go into the 4.6 merge window, but I never committed it. I almost forgot about it again, but noticed it was missing from your tree. - Soumya PN sent me a clean up patch to not disable interrupts when taking the tasklist_lock for read, as it's unnecessary because that lock is never taken for write in irq context. - Newer gcc's can cause the jump in the function_graph code to the global ftrace_stub label to be a short jump instead of a long one. As that jump is dynamically converted to jump to the trace code to do function graph tracing, and that conversion expects a long jump it can corrupt the ftrace_stub itself (it's directly after that call). One way to prevent gcc from using a short jump is to declare the ftrace_stub as a weak function, which we do here to keep gcc from optimizing too much" * tag 'trace-v4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ftrace/x86: Set ftrace_stub to weak to prevent gcc from using short jumps to it ftrace: Don't disable irqs when taking the tasklist_lock read_lock ftracetest: Add instance created, delete, read and enable event test
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/ftrace.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index a6c8252d7776..900dbb1efff2 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -5737,7 +5737,6 @@ static int alloc_retstack_tasklist(struct ftrace_ret_stack **ret_stack_list)
5737{ 5737{
5738 int i; 5738 int i;
5739 int ret = 0; 5739 int ret = 0;
5740 unsigned long flags;
5741 int start = 0, end = FTRACE_RETSTACK_ALLOC_SIZE; 5740 int start = 0, end = FTRACE_RETSTACK_ALLOC_SIZE;
5742 struct task_struct *g, *t; 5741 struct task_struct *g, *t;
5743 5742
@@ -5753,7 +5752,7 @@ static int alloc_retstack_tasklist(struct ftrace_ret_stack **ret_stack_list)
5753 } 5752 }
5754 } 5753 }
5755 5754
5756 read_lock_irqsave(&tasklist_lock, flags); 5755 read_lock(&tasklist_lock);
5757 do_each_thread(g, t) { 5756 do_each_thread(g, t) {
5758 if (start == end) { 5757 if (start == end) {
5759 ret = -EAGAIN; 5758 ret = -EAGAIN;
@@ -5771,7 +5770,7 @@ static int alloc_retstack_tasklist(struct ftrace_ret_stack **ret_stack_list)
5771 } while_each_thread(g, t); 5770 } while_each_thread(g, t);
5772 5771
5773unlock: 5772unlock:
5774 read_unlock_irqrestore(&tasklist_lock, flags); 5773 read_unlock(&tasklist_lock);
5775free: 5774free:
5776 for (i = start; i < end; i++) 5775 for (i = start; i < end; i++)
5777 kfree(ret_stack_list[i]); 5776 kfree(ret_stack_list[i]);