aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-06-13 13:45:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-06-13 13:45:49 -0400
commitc78a9b9b8e36b8de302eddbe7a1688af3d9650ff (patch)
tree3857996cf30ae6a60b5afe2e1e3e30f75fbca05e /kernel
parent842c895d140a75e5d67fa346213deb3ca2b460f8 (diff)
parent5f127133ee432d0b83ee26e8e3a3d7828ab5f2b1 (diff)
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: ftrace: Revert 8ab2b7efd ftrace: Remove unnecessary disabling of irqs kprobes/trace: Fix kprobe selftest for gcc 4.6 ftrace: Fix possible undefined return code oprofile, dcookies: Fix possible circular locking dependency oprofile: Fix locking dependency in sync_start() oprofile: Free potentially owned tasks in case of errors oprofile, x86: Add comments to IBS LVT offset initialization
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/ftrace.c9
-rw-r--r--kernel/trace/trace_kprobe.c8
2 files changed, 14 insertions, 3 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 1ee417fcbfa5..908038f57440 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -2740,7 +2740,7 @@ static int ftrace_process_regex(struct ftrace_hash *hash,
2740{ 2740{
2741 char *func, *command, *next = buff; 2741 char *func, *command, *next = buff;
2742 struct ftrace_func_command *p; 2742 struct ftrace_func_command *p;
2743 int ret; 2743 int ret = -EINVAL;
2744 2744
2745 func = strsep(&next, ":"); 2745 func = strsep(&next, ":");
2746 2746
@@ -3330,6 +3330,7 @@ static int ftrace_process_locs(struct module *mod,
3330{ 3330{
3331 unsigned long *p; 3331 unsigned long *p;
3332 unsigned long addr; 3332 unsigned long addr;
3333 unsigned long flags;
3333 3334
3334 mutex_lock(&ftrace_lock); 3335 mutex_lock(&ftrace_lock);
3335 p = start; 3336 p = start;
@@ -3346,7 +3347,13 @@ static int ftrace_process_locs(struct module *mod,
3346 ftrace_record_ip(addr); 3347 ftrace_record_ip(addr);
3347 } 3348 }
3348 3349
3350 /*
3351 * Disable interrupts to prevent interrupts from executing
3352 * code that is being modified.
3353 */
3354 local_irq_save(flags);
3349 ftrace_update_code(mod); 3355 ftrace_update_code(mod);
3356 local_irq_restore(flags);
3350 mutex_unlock(&ftrace_lock); 3357 mutex_unlock(&ftrace_lock);
3351 3358
3352 return 0; 3359 return 0;
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index f925c45f0afa..27d13b36b8be 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -1870,8 +1870,12 @@ fs_initcall(init_kprobe_trace);
1870 1870
1871#ifdef CONFIG_FTRACE_STARTUP_TEST 1871#ifdef CONFIG_FTRACE_STARTUP_TEST
1872 1872
1873static int kprobe_trace_selftest_target(int a1, int a2, int a3, 1873/*
1874 int a4, int a5, int a6) 1874 * The "__used" keeps gcc from removing the function symbol
1875 * from the kallsyms table.
1876 */
1877static __used int kprobe_trace_selftest_target(int a1, int a2, int a3,
1878 int a4, int a5, int a6)
1875{ 1879{
1876 return a1 + a2 + a3 + a4 + a5 + a6; 1880 return a1 + a2 + a3 + a4 + a5 + a6;
1877} 1881}