diff options
Diffstat (limited to 'arch/x86/kernel/ftrace.c')
-rw-r--r-- | arch/x86/kernel/ftrace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c index 66d900248fc2..222507e8157b 100644 --- a/arch/x86/kernel/ftrace.c +++ b/arch/x86/kernel/ftrace.c | |||
@@ -71,13 +71,13 @@ ftrace_modify_code(unsigned long ip, unsigned char *old_code, | |||
71 | * No real locking needed, this code is run through | 71 | * No real locking needed, this code is run through |
72 | * kstop_machine, or before SMP starts. | 72 | * kstop_machine, or before SMP starts. |
73 | */ | 73 | */ |
74 | if (__copy_from_user(replaced, (char __user *)ip, MCOUNT_INSN_SIZE)) | 74 | if (__copy_from_user_inatomic(replaced, (char __user *)ip, MCOUNT_INSN_SIZE)) |
75 | return 1; | 75 | return 1; |
76 | 76 | ||
77 | if (memcmp(replaced, old_code, MCOUNT_INSN_SIZE) != 0) | 77 | if (memcmp(replaced, old_code, MCOUNT_INSN_SIZE) != 0) |
78 | return 2; | 78 | return 2; |
79 | 79 | ||
80 | WARN_ON_ONCE(__copy_to_user((char __user *)ip, new_code, | 80 | WARN_ON_ONCE(__copy_to_user_inatomic((char __user *)ip, new_code, |
81 | MCOUNT_INSN_SIZE)); | 81 | MCOUNT_INSN_SIZE)); |
82 | 82 | ||
83 | sync_core(); | 83 | sync_core(); |